Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / rc.lua.txt
Created June 11, 2013 14:44
rc.lua
-- my awesome config
-- swimmer@xs4all.nl - 2013-06-06
-- vim: fdl=0 tw=200
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
awful.rules = require("awful.rules")
require("awful.autofocus")
-- Widget and layout library
@witoff
witoff / litecoin_miner.sh
Created March 17, 2013 03:35
Add a litecoin pool miner as a low priority task to your *nix server
wget https://github.com/downloads/pooler/cpuminer/pooler-cpuminer-2.2.3-linux-x86_64.tar.gz
tar -xvzf pooler-cpuminer-2.2.3-linux-x86_64.tar.gz
# Replace USER, ID & PASS with your creds setup on http://litecoinpool.org/account
echo "nohup nice -n 20 ./minerd --url http://litecoinpool.org:9332/ --userpass USER.ID:PASS" > litecoin.sh
chmod a+x litecoin.sh
./litecoin.sh &
# Find thir process
# ps axl | grep lite
@FiXato
FiXato / ansinator.rb
Last active December 11, 2015 20:49
A bit of an updated version of my ansinator script. Should toss it in a proper repo.
#!/usr/bin/env ruby
# encoding: utf-8
# Based on the 'colors' zsh script I found online somewhere years ago.
# It looks like it is based on works posted at http://crunchbanglinux.org/forums/topic/13645/ansi-colorschemes-scripts/page/2/
# I've basically just edited it a bit to work with IRC control codes as well.
# ~~Filip H.F. "FiXato" Slagter, 2012
abort("You need at least Ruby 1.9 to run this script due to encoding issues") if RUBY_VERSION < '1.9'
class String
def center(str_length)
delta = str_length - self.length
Ncurses:
(Using sources from Ubuntu repository)
Configure flags for ncurses with wide character support:
./configure --prefix=$HOME/local --enable-widec --with-shared --without-debug
make && make install
Weechat:
(Sources downloaded from weechat site)
Point the weechat configure script to right place:
env CFLAGS="-I$HOME/local/include" -LDFLAGS="-L$HOME/local/lib" cmake .. -DPREFIX=$HOME/local
@axilleas
axilleas / archgitlab.sh
Last active March 29, 2021 11:53
Install GitLab 5.0 on Archlinux
#!/bin/bash
##########################
## Check if run as root ##
##########################
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@cristianrasch
cristianrasch / gitlab.sh
Created April 22, 2012 01:50
Install Gitlab on Debian Squeeze/Wheezy
aptitude install -y git curl python-dev python-pip redis-server ruby1.9.1-full rubygems1.9.1
aptitude install -y mysql-server libmysqlclient-dev
adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git
adduser --disabled-login --gecos 'gitlab system' gitlab
usermod -a -G git gitlab
su - gitlab
ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa
aptitude install gitolite
cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
su - git
@davatron5000
davatron5000 / gist:2254924
Created March 30, 2012 20:57
Static Site Generators

Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.

Ruby

pdl-idler CHANGELOG
[version 0.9025]
+ remove xorg/xvfb display server pid mark and deduce by display id instead
+ simplify display driver detection in status and cache hl2_pid gather
+ remove inotifywait dependancy and use wineserver -w instead in registry prep
+ only check for defunct hl2 pids on startup and organize clutch deletions
+ move hl2 pid check from disconnect() to before the action is started
+ simplify killing of hl2 in stop, and preserve files in logout with $debug
+ increase sourceirc msg delay to 2 seconds and always compile pdl-idler.sp

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

#!/usr/bin/env ruby
# Aside from removing Ruby on Rails specific code this is taken verbatim from
# mislav's git-deploy (http://github.com/mislav/git-deploy) and it's awesome
# - Ryan Florence (http://ryanflorence.com)
#
# Install this hook to a remote repository with a working tree, when you push
# to it, this hook will reset the head so the files are updated
if ENV['GIT_DIR'] == '.'