Skip to content

Instantly share code, notes, and snippets.

#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
# Ubuntu upstart file at /etc/init/redis-server.conf
description "redis server"
pre-start script
mkdir -p /var/lib/redis/
mkdir -p /var/log/redis/
chown -R redis /var/lib/redis/
chown -R redis /var/log/redis/
end script
<?php
/**
Web Analytics MediaWiki extension
==Analytics.php==
Add tracking JavaScript scripts to all Wiki Pages. It has option not to track logged-in users.
==Installation==
Save [https://raw.github.com/genealo/mediawiki-extensions/master/Analytics.php Analytics.php] as <mediawiki_installed_dir>/extensions/Analytics.php.
#!/bin/bash
# <UDF name="ssh_key" Label="Paste in your public SSH key" default="" example="" optional="false" />
# root ssh keys
mkdir /root/.ssh
echo $SSH_KEY >> /root/.ssh/authorized_keys
chmod 0700 /root/.ssh
# update to latest
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request
navigationType:(UIWebViewNavigationType)navigationType {
NSString *urlString = [[request URL] absoluteString];
if ([urlString hasPrefix:@"js:"]) {
NSString *jsonString = [[[urlString componentsSeparatedByString:@"js:"] lastObject]
stringByReplacingPercentEscapes];
NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
NSError *error;

Headers

A First Level Header
====================

A Second Level Header
---------------------
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
@ninegene
ninegene / install-sopcast-player.sh
Created October 28, 2015 05:59
SopCast Player Install Script for Linux
#!/bin/bash
set -ex
sudo apt-get update
sudo apt-get install vlc python gettext python-setuptools
sudo apt-get install libvlc-dev hicolor-icon-theme python-glade2 python-gobject python-gtk2
cd /tmp
wget -c -O sopcast-player.tgz https://sopcast-player.googlecode.com/files/sopcast-player-0.8.5.tar.gz
tar xzvf sopcast-player.tgz

Based on: Ultimate Full-Body Dumbbell Workout | Andy Speer

Complex 1: Power and Stretching

Perform 3 rounds, resting 60-90 sec. between rounds

  1. Dumbbell Clean: 10 reps
  2. Dumbbell Push Press: 10 reps
  3. Dumbbell Front Squat: 10 reps

Complex 2: Hypertrophy Series

Perform 3 rounds, resting 60 sec. between rounds

Incline Fly/Press (incline bench)

  • upper chest & shoulder cap (higher incline, more shoulder workout)
  • feet under keen and firm on the floor
  • pack shoulder, chest up - minor arch of the back
  • breath in - lower dumbbell while keeping around 90 degreee bend of elbows
  • breath out - press up while keeping slight bend of elbows (no locking of elbows)
  • dumbbell over your chest (not over your neck and face)
  • lighter weight for safety

Dumbbell Pullover for Chest (on bench)