Skip to content

Instantly share code, notes, and snippets.

View crynobone's full-sized avatar
🖥️
Working

Mior Muhammad Zaki crynobone

🖥️
Working
View GitHub Profile
@sumardi
sumardi / mpnml
Created November 21, 2012 10:32 — forked from romanr/mpnml
Mysql, Php-fpm, Nginx on OSX Mountain Lion
sudo port -v install mysql5-server
sudo -u _mysql mysql_install_db5
# if above command produce this error: ERROR: 1004 Can't create file '/var/tmp/#sqle967_1_0.frm' (errno: 9)
# do this:
# sudo chown -R mysql:mysql /opt/local/var/db/mysql5
# sudo chmod u+rwx,go= /opt/local/var/db/mysql5
# sudo /opt/local/lib/mysql5/bin/mysql_install_db --user=mysql
@machuga
machuga / Gemfile
Last active December 14, 2015 17:29
Guard for Jasmine CLI tests
source :rubygems
gem 'guard'
gem 'guard-shell'
gem 'rb-fsevent', :require => false
gem 'terminal-notifier-guard' # This will use OSX native notifications
@JesseObrien
JesseObrien / name.conf
Last active December 19, 2015 06:18
A Good Nginx Config
server{
listen 80;
# Uncomment for SSL
#listen 443;
server_name example.com www.example.com;
# Uncomment for SSL
#ssl on;
#ssl_certificate /etc/ssl/mycert.crt;
#ssl_certificate_key /etc/ssl/mycert.key;
@alanhamlett
alanhamlett / ajax_setup.js
Last active January 13, 2021 02:18
Sets the X-CSRFToken header for every jQuery ajax non-GET request to make CSRF protection easy. This fixes the example from Django docs here: https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax
$.ajaxSetup({
beforeSend: function(xhr, settings) {
if (settings.type == 'POST' || settings.type == 'PUT' || settings.type == 'DELETE') {
function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?

Most active GitHub users in Malaysia

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 14 Nov 2012 03:35:10 GMT till Thu, 14 Nov 2013 03:35:10 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter((user) -&gt; user.followers &gt; 0)
@zmsaunders
zmsaunders / filters.php
Last active August 7, 2022 10:54
HTML Output Minification in laravel 4
<?php
### --- Snip --- ###
App::after(function($request, $response)
{
// HTML Minification
if(App::Environment() != 'local')
{
if($response instanceof Illuminate\Http\Response)
@edwardsmatt
edwardsmatt / gist:3922671
Created October 20, 2012 08:24
How to disable Hibernate Mode OSX
Disable Hibernate for SSD Performance - From here: http://blog.alutam.com/2012/04/01/optimizing-macos-x-lion-for-ssd/#hibernation
!!! Check man pmset for more information
matt@macbook : ~
$ pmset -g
Active Profiles:
Battery Power -1
AC Power -1*
Currently in use:
standbydelay 4200
standby 0
@lyrixx
lyrixx / post-checkout
Created June 26, 2013 13:37
Git post checkout
#!/bin/bash
# Put this file at: .git/hooks/post-checkout
# and make it executable
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587
PREV_COMMIT=$1
POST_COMMIT=$2
NOCOLOR='\e[0m'

Configure

xdebug.ini

xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
@JeffreyWay
JeffreyWay / .vimrc
Last active January 22, 2024 11:42
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15