Skip to content

Instantly share code, notes, and snippets.

@nragaz
nragaz / YUI Charts from Tables - Line, Pie
Created February 21, 2009 19:03
Load this file to convert table.yui-line and table.yui-pie to line and pie charts using JS and Flash.
/*
Converts well-formed HTML tables with class 'yui-line' or 'yui-pie'
to Flash charts, using YUI Loader and YUI charts.
Tables for pie charts look like:
+--------------------------------------------------+
| | Total |
+-------------------------------------+------------+
| Item 1 | 16 |
@endolith
endolith / Has weird right-to-left characters.txt
Last active June 1, 2024 10:58
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@nragaz
nragaz / all.god
Created July 12, 2010 03:16
God configs for starting Resque and Unicorn
PID_DIR = '/srv/myapp/shared/pids'
RAILS_ENV = ENV['RAILS_ENV'] = 'production'
RAILS_ROOT = ENV['RAILS_ROOT'] = '/srv/myapp/current'
BIN_PATH = "/home/rails/.rvm/gems/ree-1.8.7-2010.02/bin"
God.log_file = "#{RAILS_ROOT}/log/god.log"
God.log_level = :info
%w(unicorn resque).each do |config|
God.load "#{RAILS_ROOT}/config/god/#{config}.god"
@jhaus
jhaus / gData-class.php
Created November 30, 2010 00:02
Saving Form Data to Google Spreadsheets Using PHP and the Google Docs API via: http://farinspace.com/saving-form-data-to-google-spreadsheets/
<?php
/*
Copyright (c) 2009 Dimas Begunoff, http://www.farinspace.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
@stagas
stagas / how-to-run-apache-and-node.js-together-the-right-way.markdown
Created December 24, 2010 14:45
How to run Apache and Node.js together (the right way)

Step 1

Get a VPS that offers 2 or more IP addresses.

Step 2

From the WHM cPanel, find the menu item Service Configuration, select Apache Configuration and then click on Reserved IPs Editor.

Step 3

@imathis
imathis / gist:1218226
Created September 15, 2011 00:37 — forked from henneonrails/gist:1217518
dot files
desc "copy dot files for deployment"
task :copydot do
exclusions = [".", "..", ".DS_Store"]
Dir["#{source_dir}/**/.*"].each do |file|
if (!File.directory?(file) && !exclusions.include?(file))
cp(file, file.gsub(/#{source_dir}/, "#{public_dir}"));
end
end
end
@velocityzen
velocityzen / auth.py
Created September 26, 2011 16:30
This script take pictures from directory and post it to tumblr blog and then delete it. Tumblr API v2! This example for oath file upload.
import urlparse
import oauth2 as oauth
consumer_key = ''
consumer_secret = ''
request_token_url = 'http://www.tumblr.com/oauth/request_token'
access_token_url = 'http://www.tumblr.com/oauth/access_token'
authorize_url = 'http://www.tumblr.com/oauth/authorize'
@fred
fred / daily_update_diaspora.sh
Created January 8, 2012 14:55
Script to update Diaspora as a cron job. Install as a daily cron.
#!/bin/bash
# Assuming that Diaspora is deployed to $HOME/diaspora/master
HOME_FOLDER="/home/diaspora"
cd $HOME_FOLDER/diaspora/master
source "${HOME_FOLDER}/.rvm/environments/ruby-1.9.3-p0@diaspora"
rvm use "ruby-1.9.3-p0@diaspora"
# RUBY GC HEAP
@prellele
prellele / gist:1825744
Created February 14, 2012 10:48
Using StartSSL Certs with Nginx-Webserver

NOTE: You can check, if your config here:
http://www.sslshopper.com/ssl-checker.html

Decrypt the private key using the password you entered when you created your key:
openssl rsa -in ssl.key -out /etc/nginx/conf/ssl.key

Protect your key from prying eyes:
chmod 600 /etc/nginx/conf/ssl.key

@richard4339
richard4339 / 1
Created July 28, 2012 14:40
DD-WRT IPV6
interface br0 {
AdvSendAdvert on;
prefix 2001:55c:[WAN IP in hex form ####.####]::/64
{
AdvOnLink on;
AdvAutonomous on;
};
};