brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
#!/bin/bash | |
play() { | |
playlist="http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_$1.m3u8" | |
echo $playlist | |
if mpc | |
then | |
mpc add $playlist | |
mpc play | |
else | |
mplayer $playlist |
# Enable syntax-highlighting in less. | |
# Last tested on CentOS 6.3. | |
# | |
# First, add these two lines to ~/.bashrc | |
# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s" | |
# export LESS=" -R " | |
sudo yum -y install boost boost-devel ctags | |
wget http://springdale.math.ias.edu/data/puias/unsupported/6/x86_64/source-highlight-3.1.6-3.puias6.x86_64.rpm |
@mixin circle($width, $color) { | |
width: $width; | |
height: $width; | |
background: $color; | |
-webkit-border-radius: $width/2; | |
-moz-border-radius: $width/2; | |
border-radius: $width/2; | |
} | |
.circle { |
Problem: When linking to the raw version of a gist, the link changes with each revision.
Solution:
To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/
To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]
curl -L https://gist.github.com/westonruter/ea038141e46e017d280b/download | tar -xvz --strip-components=1 |
[Unit] | |
Description=Jenkins | |
After=network.target | |
Requires=network.target | |
[Service] | |
Type=simple | |
EnvironmentFile=/etc/sysconfig/jenkins | |
ExecStart=/usr/bin/java ${JENKINS_JAVA_OPTIONS} -jar /usr/lib/jenkins/jenkins.war --httpPort=${JENKINS_PORT} --httpListenAddress=${JENKINS_LISTEN_ADDRESS} ${JENKINS_ARGS} | |
Restart=always |
#http://pastebin.com/xGt6vv9R from yardenbar | |
output { | |
if [type] == "postfix" { | |
elasticsearch { | |
host => [ "ES_HOSTNAME" ] | |
protocol => "transport" | |
cluster => "elasticsearch" | |
index => "postfix-%{+YYYY.MM.dd}" | |
manage_template => true | |
template_overwrite => true |
apt-get install --no-install-recommends -y hdparm lshw | |
hdparm -I /dev/sda | sed -n '/Number/p;/size.*GB/p' | |
lshw -class disk -class storage |