Skip to content

Instantly share code, notes, and snippets.

View aqlx86's full-sized avatar
🦊
Focusing

Arnel Labarda aqlx86

🦊
Focusing
View GitHub Profile
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
## Acer
#SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0600", OWNER="<username>"
## ASUS
#SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0600", OWNER="<username>"
## Dell
#SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0600", OWNER="<username>"
## Foxconn
@aqlx86
aqlx86 / yii.nginx.conf
Last active October 10, 2017 02:25
Yii +Nginx + PHP-FPM configuration
server {
set $host_path "/var/www/yoursite.com";
access_log /var/www/yoursite.com/log/access.log main;
server_name yoursite.com www.yoursite.com;
root $host_path/htdocs;
set $yii_bootstrap "index.php";
@aqlx86
aqlx86 / Preference.sublime-settings
Last active August 29, 2015 14:06
SublimeText3 Settings
{
"color_scheme": "Packages/User/Monokai Soda.tmTheme",
"font_face": "Source Code Pro",
"font_options": "subpixel_antialias",
"font_size": 10,
"ignored_packages":
[
"Vintage"
],
"spacegray_sidebar_tree_small": true,
################################
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
gource --title "Makkoto Website" --logo ./g/logo.png --user-image-dir ./g --max-user-speed 500 --seconds-per-day 0.05 -e 0.005 -f --max-files 400 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@aqlx86
aqlx86 / fr.sh
Created November 1, 2014 19:43
find replace
find ./features/ -type f -exec sed -i -e 's/foo/bar/g' '{}' \;
@aqlx86
aqlx86 / post-receive sample.sh
Created March 16, 2015 13:01
git post-receive
# remote server domain.com
# create deploy directory
mkdir /www/app/
# create repo dir
mkdir repo.git && cd repo.git
# init git repo
git init --bare