Skip to content

Instantly share code, notes, and snippets.

View leite's full-sized avatar
🎉
it is happening

Francisco Leite leite

🎉
it is happening
View GitHub Profile
@hakre
hakre / change-admin-url.php
Created November 16, 2010 00:37
Change Admin URL
<?php
/**
* Change Admin URL
*
* Copyright (C) 2010 hakre <http://hakre.wordpress.com/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
@colinmollenhour
colinmollenhour / redis_
Created August 29, 2011 03:26
Munin plugin for Redis with added options
#!/usr/bin/perl -w
#
## Copyright (C) 2011 Colin Mollenhour <http://colin.mollenhour.com/>
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; version 2 dated June,
## 1991.
##
@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@arosenhagen
arosenhagen / magento-code-snippets.md
Last active April 8, 2024 09:21
[magento] - code snippets

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@Alan01252
Alan01252 / phpbitmask.php
Created June 19, 2012 19:02
PHP Bitmasks
<?php
//Define our bitmask
define("allowEverythingBitmask",1); //In binary 0001
//Our user
class User {
private $permissionBitmask = 1; //In binary 0001
public function setPermissionBitmask($bitmask)
{
$this->permissionBitmask = $bitmask;
@kevinelliott
kevinelliott / osx-10.9-setup.md
Last active November 6, 2020 14:19 — forked from juev/gist:3124344
Clean Install – Mac OS X 10.9 Mavericks

Mac OS X 10.9 Mavericks

Custom recipe to get OS X 10.9 Mavericks running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install.

Install Software

The software selected is software that is "tried and true" --- software I need after any fresh install. I often install other software not listed here, but is handled in a case-by-case basis.

Install from App Store

@leite
leite / gist:3520137
Last active October 9, 2015 14:08
php compilation
sudo ./configure --enable-bcmath --enable-calendar --enable-exif --enable-ftp --enable-gd-native-ttf --enable-mbstring --enable-shmop --enable-sockets --enable-sysvsem --enable-sysvshm --enable-tokenizer --enable-wddx --with-openssl --with-zlib-dir --with-zlib --with-bz2 --with-jpeg-dir --with-curl --with-gd --with-png-dir --with-xpm-dir --with-freetype-dir --with-gettext --with-gmp=/usr/include --with-mcrypt=/usr/local/libmcrypt --with-mhash --with-mysql --with-pspell --with-regex=php --with-xmlrpc --with-iconv --with-tsrm-st --with-tsrm-pthreads --with-kerberos --enable-soap --with-pdo-mysql --with-mysqli --with-libxml --with-xsl --with-config-file-scan-dir=/usr/lib/php5 --with-config-file-path=/usr/lib/php5/php.ini
@Deco
Deco / deepcopy.lua
Created October 31, 2012 05:38
Lua Non-recursive Deep-copy
--[[ deepcopy.lua
Deep-copy function for Lua - v0.2
==============================
- Does not overflow the stack.
- Maintains cyclic-references
- Copies metatables
- Maintains common upvalues between copied functions (for Lua 5.2 only)
TODO
@brasofilo
brasofilo / wpse_70758.php
Created November 19, 2012 14:08
WordPress plugin : Prevent Categories Deletion
<?php
/*
Plugin Name: Prevent Category Deletion
Plugin URI: http://wordpress.stackexchange.com/q/70758/12615
Description: Prevent deletion of categories. Modify the $undeletable array to suit your setup. Use Category SLUGS.
Author: brasofilo
Version: 1.0
Author URI: http://wordpress.stackexchange.com/users/12615/brasofilo
*/