Skip to content

Instantly share code, notes, and snippets.

View aarti's full-sized avatar
🎯
Focusing

aarti

🎯
Focusing
  • San Francisco Bay Area
View GitHub Profile
@matthewlehner
matthewlehner / autopgsqlbackup
Created July 11, 2012 16:10
Auto PostgreSQL backup script.
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <[email protected]>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9
<cluster-user>admin</cluster-user>
<cluster-password>mypassword</cluster-password>
@papoms
papoms / fake-referrer.casper.js
Created August 24, 2012 16:10
Fake Referrer with CasperJS
var fakeReferrer = "http://porzky.com"
var targetUrl = "http://keyworddomains.com"
var casper = require('casper').create();
casper.start(fakeReferrer, function() {
this.echo(this.getCurrentUrl());
});
casper.then(function(){
@stevez
stevez / alias_method
Created September 24, 2012 03:06
alias_method
module Mod
alias_method :orig_exit, :exit
def exit(code=0)
puts "Exiting with code #{code}"
orig_exit(code)
end
end
include Mod
exit(99)
@titusz
titusz / link_area.html
Created December 8, 2012 16:59
kf8 fixed layout drives me crazy
TORQUEBOX_SERVER=standalone.xml
TORQUEBOX_HOME=/opt/torquebox
RUN=yes
@raphaelcm
raphaelcm / Gemfile
Last active December 15, 2015 22:08
Integrating with LinkedIn using Rails, Mongoid, Devise, Omniauth, LinkedIn Gem
# Gemfile
gem "linkedin"
gem "omniauth"
gem "omniauth-linkedin"
@basgys
basgys / simple_paperclip.rb
Created June 5, 2013 08:25
Use Paperclip without ActiveRecord
# == Paperclip without ActiveRecord
#
# Simple and lightweight object that can use Paperclip
#
#
# Customized part can be extracted in another class which
# would inherit from SimplePaperclip.
#
# class MyClass < SimplePaperclip
# attr_accessor :image_file_name # :<atached_file_name>_file_name
@JesterXL
JesterXL / ropeJointvsDistanceJoint.lua
Last active December 18, 2015 08:09
Show's a Box2D rope joint vs. a distance joint in Corona SDK.
require "physics"
display.setStatusBar( display.HiddenStatusBar )
physics.setDrawMode("hybrid")
physics.start()
physics.setGravity(0, 9.8)
physics.setPositionIterations( 10 )
function getGrapplePoint()
local point = display.newRect(0, 0, 10, 10)
physics.addBody(point,"static", {density = 1, friction = .5, bounce = .1})
@kenshinx
kenshinx / client.go
Last active February 3, 2024 18:49
golang socket server & client ping-pong demo
package main
import (
"os"
"log"
"net"
"strconv"
"strings"
)