This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir ~/git/website.git && cd ~/git/website.git | |
git init --bare | |
mkdir ~/webapps/website | |
git config receive.denycurrentbranch ignore | |
git config core.bare false | |
git config core.worktree ~/webapps/website ; NO TRAILING SLASH!!! Will screw up things real bad. | |
; create a hook | |
nano hooks/post-receive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$('form').live('submit', function() | |
{ | |
var form = $(this); | |
var action = form.attr('action'); | |
$.post(action, form.serialize(), function(response) | |
{ | |
form.replaceWith(response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* User to user communication wrapper. Uses Swift Mailer for email transport. | |
* | |
* @package Communicate | |
* @category Base | |
* @author Woody Gilk <woody@wingsc.com> | |
* @copyright (c) 2010 Woody Gilk | |
* @license MIT | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# have submodules been added? | |
MODS=0 | |
# Github base URL | |
GITHUB="https://github.com" | |
# Default branch | |
DEFAULT_BRANCH="3.0/master" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I book marked some sites with useful Linux commands i found. | |
# then i noticed they were down, so i loaded them via google cache, and copied here. | |
# source: http://blog.urfix.com/ | |
# source: http://www.pixelbeat.org/cmdline.html | |
# Enjoy! | |
# How to run process as background and never die | |
# | |
# nohup means: Do not terminate this process even when the stty is cut off. | |
# > /dev/null means: stdout goes to /dev/null (which is a dummy device that does not record any output). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* JSON helper class | |
* | |
* Examples: | |
* $j = JSON::decode('{"Organization": "Kohana"}'); // Good | |
* $j = JSON::decode("{'Organization': 'Kohana'}"); // Invalid | |
* $j = JSON::decode('{"Organization": "Kohana"}', NULL, 1); // depth stack exceeded | |
* | |
* @package Kohana |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is my compile command | |
# works good for me with PHP 5.3/5.4 | |
# You might need this packages too (CentOS 5/6 tested) | |
#sudo yum install libxml2-devel.x86_64 | |
#sudo yum install httpd-devel.x86_64 | |
#sudo yum install openssl-devel.x86_64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# if you need to set mouse sensitivity on X or gnome3 to value lower than the | |
# mouse configuration utility provides, this is the script for you. | |
# script built for fedora 17, but it should work for some other distros as well. | |
echo -e "\ncheck the 'id' of you mouse device ...\n" | |
xinput | |
echo "---- ---- ---- ----" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# basic makefile for c++ project | |
SOURCE=main.cpp your_include.h | |
MYPROGRAM=shellgap | |
MYINCLUDES= | |
MYLIBRARIES= | |
CC=g++ | |
#------------------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A 2D/3D collision grid. MIT licensed | |
// - rlyeh, 2012 | |
#pragma once | |
#include <map> | |
#include <set> | |
#include <cassert> | |
#include <tuple> |
OlderNewer