To clean old file in repo
$message = \Swift_Message::newInstance()
->setSubject('Hello Email')
->setFrom('toto@gmail.com')
->setTo('toto@gmail.com')
->setBody('toto',
'text/html'
)
;
$this->get('mailer')->send($message);
dl archive
tar xf
stop server
rsync -av new_dir/ old_dir/
start server
1) stop ts3server
2) bash ts3server_minimal_runscript.sh serveradmin_password=new_password
3) telnet 127.0.0.1 10011
4)
login serveradmin new_password
use port=9987
tokenadd tokentype=0 tokenid1=6 tokenid2=0
le '6' est l'id du groupe serveradmin qui peut changer... checker dans le client dans les permissions, on peut voir l'id dans les groupes de serveurs
5) Copier/coller le token dans le client et bam ça fait des chocapic !
encore un article qui plébiscite vue
ReadWrite :
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:GetBucketLocation", "s3:ListBucket"],
"Resource": [
"arn:aws:s3:::LeBucket"
]
},
{
"Effect": "Allow",
"Action": [
"s3:"
],
"Resource": [
"arn:aws:s3:::LeBucket/"
]
}
]
}
Pour Read only, remplacer action du deuxieme bloc par "Action": ["s3:Get","s3:List"],
Pourquoi pas pour la voiture
Add /json to pypi package url.. Magic!
Exactement ce que je cherchais
You can use the mysql_config_editor utility to store authentication credentials in an encrypted login path file named .mylogin.cnf.
To create a new set of credentials run:
mysql_config_editor set --host=db.host.org --user=dbuser --password
and enter your password when prompted.
This will store your authentication credentials in the default client login path.
You can store multiple authentication credentials by specifying a different --login-path option:
mysql_config_editor set --login-path=db2 --host=db2.host.org --user=dbuser --password
By default, the mysql client reads the [client] and [mysql] groups from other option files, so it reads them from the login path file as well. With a --login-path option, client programs additionally read the named login path from the login path file. The option groups read from other option files remain the same. Consider this command:
mysql --login-path=db2
The mysql client reads [client] and [mysql] from other option files, and [client], [mysql], and [mypath] from the login path file.
To print out all the information stored in the configuration file run:
mysql_config_editor print --all=true
More information about the utility can be found at "mysql_config_editor — MySQL Configuration Utility".
CREATE DATABASE foo DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE foo DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;
CREATE USER 'foo'@'%' IDENTIFIED BY "password";
GRANT ALL ON foo.* TO "foo"@"%";
convert :
ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE table_name CHANGE column_name column_name VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
VARCHAR column.)If you enable s3 enpoint in your route table, it's kind of tricky to know if the endpoint is really working. Two things to validate:
1) traceroute tcp before and after (traceroute -T s3-us-west-1.amazonaws.com 443)
You will see more hope when endpoint not activated
2) try an s3 sync cross region with enpoint activated : it should failed since it's not supported (yet @ 2017-05-02)
:Glog
:clist
:cprev
:cnext
:cfirst
:clast
catching all exception in python
import traceback
for record in database:
try:
blabla
except (KeyboardInterrupt, SystemExit):
raise
except Exception as e:
# report error and proceed
print(type(e).name)
print(e)
print(traceback.format_exc())
Ne pas oublier de raise si on veut re-raise
Pratique quand on doit jongler entre différents comptes AWS
et l'équivalent pour s3cmd : http://mikesisk.tumblr.com/post/8703449578/s3cmd-and-multiple-accounts
about:config
punycode
Des snippets en plain js
|jq -r '.ApplicationVersions|sort_by(.DateCreated)|.[]|.VersionLabel'|tail -1
C'est pas le 1er Twitter like décentralisé, est ce que ça va prendre ?
Via Skunnyk
set -eux
Shellcheck
reptyr
diff -r folder1 folder2 | grep -P '(^diff|^Only)'
diff -r folder1 folder2 | grep -P '(^diff|^Only)' | sed -r 's/^diff -r /vimdiff /'
I may have to use this one, but issue number is freaking me out
C'est vraiment se compliquer la vie pour pas grande chose
Et puis je m'en souviens jamais : en hiver on est GMT+1, en été on est GMT+2
subnets = ec2.subnets.all()
subnets_sorted = sorted(subnets, key=lambda k: k.tags[next(index for (index, d) in enumerate(k.tags) if d["Key"] == "Name")]['Value'])
Well, my python level is not good enough to clearly understand this but my Google level was largely enough to build this