This file contains hidden or 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 hidden or 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
################################ | |
gource commands | |
################################ | |
# basic command for big and long projects | |
gource --max-user-speed 500 --seconds-per-day 0.05 --file-idle-time 10 -e 0.005 -f --max-files 300 --hide-files | |
# some easy to understand commands | |
# for output file | |
--output-ppm-stream ~/ppm/ppm-kohana |
This file contains hidden or 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 | |
/** | |
* A function to sort data array element by one or two sub keys, both directions | |
*/ | |
function sksort(&$array, $subkey = "id", $subkey2 = null ,$sort_ascending=false) | |
{ | |
if (count($array)) | |
$temp_array[key($array)] = array_shift($array); |
This file contains hidden or 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 | |
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
/** | |
* Description of SimplePlugin | |
* | |
* @author alkavan |
This file contains hidden or 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
# | |
# my mod_deflate settings, it's important not to uncomment last AddOutputFilterByType! | |
# | |
<IfModule mod_deflate.c> | |
DeflateCompressionLevel 7 | |
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript | |
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml | |
AddOutputFilterByType DEFLATE application/javascript application/x-javascript | |
#AddOutputFilterByType DEFLATE application/x-httpd-php |
This file contains hidden or 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 hidden or 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 hidden or 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.'); | |
/** | |
* Plugin Controller Template | |
* @file \modules\plugin\classes\controller\template\plugin.php | |
*/ | |
abstract class Controller_Template_Plugin extends Controller_Template | |
{ | |
public $event_markdown = TRUE; | |
public function before() |
This file contains hidden or 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 hidden or 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
Section "ServerLayout" | |
Identifier "X.org Configured" | |
Screen 0 "Screen0" 0 0 | |
EndSection | |
Section "Files" | |
ModulePath "/usr/lib/xorg/modules" | |
FontPath "/usr/share/fonts/misc/" | |
FontPath "/usr/share/fonts/TTF/" | |
FontPath "/usr/share/fonts/OTF" |
OlderNewer