I hereby claim:
- I am lucien144 on github.
- I am lucien144 (https://keybase.io/lucien144) on keybase.
- I have a public key ASDFejBGrN-ygUjU4gIvMTWeg4DdYuJMZPvFBh_Ezl4w3wo
To claim this, I am signing this object:
| if [ -f ~/.bashrc ]; then | |
| . ~/.bashrc | |
| fi |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| START=$SECONDS | |
| FILES=/var/www/vhosts/site.com/logs/access-2*.log | |
| # Generate summary | |
| goaccess /var/www/vhosts/site.com/logs/access.log --geoip-database /var/www/vhosts/site.com/logs/GeoIP.dat -o /var/www/vhosts/site.com/web/web/reports/summary.html | |
| # Generate monthly reports | |
| # -> Split logs |
Pull mariadb image
docker pull mariadb
Run container
docker run \
--name mariadb \
-p 4306:3306 \
--tmpfs /var/lib/mysql:rw \
-e MYSQL_ROOT_PASSWORD=root \
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
| #!/bin/sh | |
| # Author: http://serverfault.com/questions/191083/how-can-i-run-a-script-from-cron-only-once-at-a-time/639747 | |
| LOCKDIR=/tmp/.myprog.lock | |
| mkdir $LOCKDIR || exit 0 | |
| trap "{ rm -rf $LOCKDIR ; exit 0; }" EXIT | |
| echo "a" | |
| sleep 30 | |
| echo "b" |
| package com.thebutton.utils { | |
| import flash.events.AccelerometerEvent; | |
| import flash.sensors.Accelerometer; | |
| /** | |
| * Accelerometer is now a singleton - saves a lot of events being created and fired - for better performance. | |
| * @author Jakub Wagner, thebuttongame.io | |
| */ | |
| public class AccelerometerSingleton { | |
| private static var _instance:AccelerometerSingleton = new AccelerometerSingleton(); |
| #!/bin/bash | |
| START=$SECONDS | |
| DATE=`date +%Y%m%d%H%M` | |
| MYSQL=mysql | |
| MYSQLDUMP=mysqldump | |
| DBNAME="dbname" | |
| USER="mysqldump" | |
| PASSWORD="***" | |
| mkdir $DATE |
| #!/bin/bash | |
| adduser --disabled-password --gecos "Admin" admin | |
| echo admin:`openssl rand -base64 32` | chpasswd | |
| echo "admin ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | |
| mkdir -p /home/admin/.ssh/ | |
| echo "ssh-rsa ..." > /home/admin/.ssh/authorized_keys | |
| chmod 700 /home/admin/.ssh/ | |
| chmod 600 /home/admin/.ssh/authorized_keys | |
| chown -R admin:admin /home/admin/.ssh | |
| echo "PasswordAuthentication no" >> /etc/ssh/sshd_config |
| #!/bin/bash | |
| apt-get install automysqlbackup | |
| apt-get install s3cmd | |
| s3cmd --configure | |
| s3cmd sync --recursive --delete-removed /var/lib/automysqlbackup/ s3://bucket/mysql/ | |
| s3cmd sync --exclude-from=/root/s3cmd.exclude --recursive --delete-removed /sites s3://bucket/sites/daily/`echo $(date +"%F")`/ | |
| find /var/lib/automysqlbackup/ -name *.sql.gz -mtime +7 -exec rm {} \; |