Skip to content

Instantly share code, notes, and snippets.

View scribu's full-sized avatar

Cristi Burcă scribu

View GitHub Profile
alias add_all="svn st | grep '^\?' | awk '{print \$2}' | xargs svn add"
alias rm_all="svn st | grep '^\!' | awk '{print \$2}' | xargs svn rm"
@scribu
scribu / gist:626060
Created October 14, 2010 11:32
php ini
# add these lines in your .htaccess file
php_value memory_limit 128M
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 120
@stas
stas / deps-manager.class
Created October 5, 2011 19:31
WordPress Plugins Dependency Manger
<?php
require_once ABSPATH . '/wp-admin/includes/file.php';
require_once ABSPATH . '/wp-admin/includes/plugin.php';
require_once ABSPATH . '/wp-admin/includes/plugin-install.php';
require_once ABSPATH . '/wp-admin/includes/class-wp-upgrader.php';
/**
* Main Deps Manager Class
*/
@tierra
tierra / gist:3061041
Created July 6, 2012 15:57 — forked from markjaquith/gist:2628225
Script to sync wxWidgets SVN to GitHub
#!/bin/bash
# Intial git svn clone:
# git svn clone --prefix=svn/ -A ~/.svn2git/authors -s https://svn.wxwidgets.org/svn/wx/wxWidgets wxWidgets
cd ~/svn-git-mirrors/wxWidgets;
if [ -f .sync-running-wxWidgets ]; then exit 1; fi;
touch .sync-running-wxWidgets
@evansolomon
evansolomon / gist:3568555
Created September 1, 2012 09:53
Bash helpers for navigating WordPress code
# Alias ST2's command line tool for a shorter (easier-to-remember) name
alias st="/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl"
# Search for an open Sublime Text to a function definition
function fx() {
ack "function &?$1\(" | awk {'print $1'} | sed 's/:$//g' | xargs st
}
# Example usage from the root of a WordPress repository
@stas
stas / .gitconfig
Created October 10, 2012 09:51
WordPress Git SVN config example
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
autocrlf = false
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:Courseware/buddypress-courseware.git
[branch "master"]
anonymous
anonymous / gist:4329182
Created December 18, 2012 15:52
Install Xcode, Command Line Tools, Xquartz (on 10.8)
In a terminal (probably best to do one thing at a time):
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install php54 --with-mysql
chmod -R ug+w /usr/local/Cellar/php54/5.4.7/lib/php
pear config-set php_ini /usr/local/etc/php/5.4/php.ini
@thomasgriffin
thomasgriffin / gist:4368038
Created December 24, 2012 06:22
This is the way you should send content to the TinyMCE Editor in WP 3.5.
// This replaces the old window.send_to_editor function.
wp.media.editor.insert('your_content_goes_here');
@westonruter
westonruter / readme.md
Last active December 19, 2015 17:38
vassh: Vagrant Host-Guest SSH Command Wrapper/Proxy/Forwarder

THIS REPO HAS MOVED! It has graduated to a dedicated GitHub project: https://github.com/x-team/vassh

The big pain of doing vagrant ssh is that it doesn’t drop you into the corresponding working directory in the Vagrant guest’s synced_folder, so you have to cd to the dir and then run whatever you needed to do (e.g. wp core update). This is the problem that vassh solves: it will make sure you start out in the corresponding directory. So if you’re in your WordPress project on your host machine, all you need to do is:

$ vassh wp core update

There’s also a wrapper called vasshin which will shell you into Vagrant at the current directory, with a prompt for entering commands. This gets you colors and interactive TTY. You can also pass commands as arguments to vasshin to have them executed right away in the colorized TTY (with some additional Vagrant .bash_login echoes and SSH connection close):

@vuldin
vuldin / default.prop
Last active December 22, 2015 18:29
Install latest dev build of FxOS on ZTE Open
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
persist.usb.serialno=full_inari
persist.sys.usb.config=adb