Skip to content

Instantly share code, notes, and snippets.

View neopunisher's full-sized avatar
🎯
Focusing

Carter Cole neopunisher

🎯
Focusing
View GitHub Profile
@tessro
tessro / redis-server
Created December 16, 2009 14:20
A CentOS initscript for Redis
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

@mbostock
mbostock / .block
Last active August 11, 2016 23:10
Hilbert Tiles
license: gpl-3.0
@sspencer
sspencer / transparent-gif.js
Created October 31, 2010 22:27
Serve a transparent GIF from NodeJS
// Two ways to serve transparent GIF
var buf = new Buffer([
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00,
0x80, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x2c,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02,
0x02, 0x44, 0x01, 0x00, 0x3b]);
res.send(buf, { 'Content-Type': 'image/gif' }, 200);
@mathiasbynens
mathiasbynens / appify
Created November 12, 2010 13:46 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
@chrisjacob
chrisjacob / README.md
Created March 24, 2011 14:20
QUICK setup Github Pages + Cloud9 IDE for HTML/CSS/JavaScript hacking

QUICK setup Github Pages + Cloud9 IDE for HTML/CSS/JavaScript hacking

GitHub + GitHub Pages

  1. Get a GitHub account: https://github.com/
  2. Github > Dashboard > New Repository ... https://github.com/repositories/new
  3. Enter a Project Name and Description; click "Create Repository"
  4. On the project page ignore the suggested setup instructions... instead click on the "Admin" button
  5. Check the "GitHub Pages" checkbox... You'll get a popup.
  6. Click the "Automatic GitHub page Generator" button.
  7. Choose a funky colour... or go safe with just white... then click "Create Page" button
@saturngod
saturngod / spellcheck.php
Created March 28, 2011 03:56
google spell check api
<?php
header("Content-Type: text/xml; charset=utf-8");
$url="https://www.google.com/tbproxy/spell?lang=en";
$text = urldecode("mystary");
$body = '<!--?xml version="1.0" encoding="utf-8" ?-->';
@anwajler
anwajler / readstream.js
Created May 22, 2011 15:47
Node.js ReadStream
var path = '/tmp/read-simple.txt';
var options = { flags: 'r',
encoding: 'utf-8',
mode: 0666,
bufferSize: 1024,
start: 0,
end: 100
};
var dataReceived = function(data) {
console.log(data);
repo for a more modern version of qt (4.7)
http://atrpms.net/documentation/install/
http://packages.atrpms.net/dist/el5/qt4/
cat /etc/yum.repos.d/atrpms.repo
[atrpms]
name=ATrpms manual
baseurl=http://dl.atrpms.net/el5-$basearch/atrpms/testing/
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
@telamon
telamon / socksproxy.js
Created August 5, 2011 12:42
Socks5 proxy implementation in Node.JS
// http://www.ietf.org/rfc/rfc1928.txt
// Tested with: curl http://www.google.se/ --socks5 1080 --proxy-user foo:bar
var States = {
CONNECTED:0,
VERIFYING:1,
READY:2,
PROXY: 3
};