start new:
tmux
start new with session name:
tmux new -s myname
# info: http://it.dennyhalim.com/2009/10/perfect-mysql-backup.html | |
/bak/mysql/*/*.sql.gz { | |
daily | |
rotate 5 | |
nocompress | |
postrotate | |
export HOME=/root | |
for i in `mysql --batch -e 'show databases' | tail -n +2`; do | |
if [ ! -e /bak/mysql/$i ]; then mkdir -m 700 /bak/mysql/$i; fi |
<?php | |
/* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* { | |
-webkit-touch-callout:none; /* prevent callout to copy image, etc when tap to hold */ | |
-webkit-text-size-adjust:none; /* prevent webkit from resizing text to fit */ | |
-webkit-tap-highlight-color:rgba(0,0,0,0); /* prevent tap highlight color / shadow */ | |
-webkit-user-select:none; /* prevent copy paste, to allow, change 'none' to 'text' */ | |
} |
# Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg | |
$ sudo chown -R `whoami` /usr/local/texlive | |
$ tlmgr update --self | |
$ tlmgr install ucs | |
$ tlmgr install etoolbox | |
# Install pandoc view homebrew |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
Without wasting much time, Let us get started!
Follow these simple instructions:
Step 1: Login into your WHM panel and using easyapache
enable Memcache
Step 2: SSH into your server and fire this command yum install memcached.x86_64 php-pecl-memcache.x86_64
// | |
// CommonMacros.h | |
// Created by Tom Adriaenssen (@inferis) | |
// Inspired by the awesome work by Piet Jaspers (@pjaspers) | |
// | |
/* | |
* How to use this file: | |
* 1. Find your .pch file | |
* 2. Import this file |
#!/bin/bash | |
# Path to where you want to backup mysql databases. | |
opath=/Users/username/Sites/Backups/mysql/ | |
# Local mysql details. Make a username with only read access. Allow SELECT, LOCK TABLES. | |
mysqlhost=127.0.0.1 | |
username=read_only_user | |
password=read_only_password |