TIL :
What is this date format? 2011-08-12T20:17:46.384
The T is just a literal to separate the date from the time, and the Z means "zero hour offset" also known as "Zulu time" (UTC). If your strings always have a "Z" you can use
-
http://stackoverflow.com/questions/8405087/what-is-this-date-format-2011-08-12t201746-384zecho -n "Today : "
curl -s "http://api.fixer.io/latest?symbols=EUR,CHF&base=CHF" | jq '.rates|.EUR'
for i in {1..10}; do
dc=$(date --date="$i day ago" +%Y-%m-%d)
echo -n "$dc : "
curl -s "http://api.fixer.io/${dc}?symbols=EUR,CHF&base=CHF" | jq '.rates|.EUR'
done
echo "http://www.xe.com/currencycharts/?from=CHF&to=EUR&view=1M"
-
https://links.infomee.fr/?x9_68QTo run this inside a container, you have to docker run --privileged
You can run this on host, then map /dev/random from host inside container
/!\ In test environment ONLY :
Don't install anything, just map /dev/urandom from host into /dev/random container
docker run -v /dev/urandom:/dev/random
Test entropy : (rng-tools)
cat /dev/random | rngtest -c 1000
-
https://www.digitalocean.com/community/tutorials/how-to-setup-additional-entropy-for-cloud-servers-using-havegedWhat will happen if I use git pull --rebase ?
git pull --rebase is roughly equivalent to
git fetch
git rebase origin/master
i.e. your remote changes (C) will be applied before the local changes (D), resulting in the following tree
A -- B -- C -- D
What will happen if I use git pull --ff-only ?
It will fail.
git pull --ff-only corresponds to
git fetch
git merge --ff-only origin/master
--ff-only applies the remote changes only if they can be fast-forwarded. From the man:
Refuse to merge and exit with a non-zero status unless the current HEAD is already up-to-date or the merge can be resolved as a fast-forward
Since your local and remote branches have diverged, they cannot be resolved by a fast-forward and git pull --ff-only would fail.
-
http://stackoverflow.com/questions/25430600/difference-between-git-pull-rebase-and-git-pull-ff-only{
"Id": "S3PolicyId1",
"Statement": [
{
"Sid": "IPDeny",
"Effect": "Deny",
"Principal": {
"AWS": ""
},
"Action": "s3:",
"Resource": "arn:aws:s3:::my-wicked-awesome-bucket/*",
"Condition": {
"NotIpAddress": {
"aws:SourceIp": "72.309.38.2/32"
}
}
}
]
}
-
https://pete.wtf/2012/05/01/how-to-setup-aws-s3-access-from-specific-ips/Use ` instead of ' in the database name, and escape the _
GRANT ALL PRIVILEGES ON xian\_%.* TO xian@'192.168.1.%';
-
http://stackoverflow.com/questions/2469119/grant-permissions-to-a-set-of-databases-matching-a-pattern-in-mysql-5-0Une policy IAM est constituée de statement, ce sont des règles (des blocs de codes)
{
"Statement":[{
"Effect":"effect",
"Action":"action",
"Resource":"arn",
"Condition":{
"condition":{
"key":"value"
}
}
}
]
}
Chaque règle dans sa forme la plus simple est composée de 3 choses :
Effect : allow ou deny
Action : quelle action concerne la règle
Resource : la resource concernée
Chaque service Amazon (EC2, ECR, etc...) expose une liste d'action, on peut trouver cette liste dans la doc (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html#Action)
Et chaque resource peut être identifiée par un arn (une manière simple de retrouver un ARN est d'afficher la resources dans l'interface web AWS, il y a souvent l'arn)
-
https://links.infomee.fr/?3KOHAQJ'avais eu les RFC sur ce sujet à commenter pendant le Master, souvenir ahah
-
http://www.bortzmeyer.org/bcp38.html