start new:
tmux
start new with session name:
tmux new -s myname
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
<?php | |
/** | |
* @file | |
* gvdump.php | |
* | |
* @author: Frédéric G. MARAND <[email protected]> | |
* | |
* @copyright (c) 2014 Ouest Systèmes Informatiques (OSInet). | |
* | |
* @license MIT |
#!/bin/sh | |
yum -y groupinstall "Development Tools" | |
wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm | |
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm | |
rpm -Uvh epel-release-5*.rpm | |
rpm -Uvh remi-release-5*.rpm | |
yum -y install python-devel screen | |
yum --enablerepo=remi install libcurl-devel -y | |
mkdir /opt/miner | |
cd /opt/miner |
[alias] | |
# Look http://stackoverflow.com/questions/1057564/pretty-git-branch-graphs | |
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
lg = !"git lg1" |
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |
<!-- Для Фейсбука, Вконтакта, Одноклассников и Гуглплюса --> | |
<meta property="og:type" content="website"> | |
<meta property="og:site_name" content="Название сайта"> | |
<meta property="og:title" content="Заголовок"> | |
<meta property="og:description" content="Описание."> | |
<meta property="og:url" content="http://example.com/page.html"> | |
<meta property="og:locale" content="ru_RU"> | |
<meta property="og:image" content="http://example.com/img.jpg"> | |
<meta property="og:image:width" content="968"> | |
<meta property="og:image:height" content="504"> |
<?php | |
// Source: https://php100.wordpress.com/2009/04/13/php-y-combinator/ | |
function Y($F) | |
{ | |
$func = function ($f) { | |
return $f($f); | |
}; | |
return $func( | |
function ($f) use ($F) { |
#!/bin/bash | |
# Make file container with 100Gb size | |
dd if=/dev/zero of=container.ext4 bs=1M count=102400 | |
# Format with ext4 fs | |
mkfs ext4 -F container.ext4 | |
# Make mount-directory | |
sudo mkdir -p /mnt/container_dir |