Skip to content

Instantly share code, notes, and snippets.

@shadyvb
shadyvb / us-github-unassigned-issues-filter.js
Last active August 29, 2015 13:56
[userscript] Unassigned filter in GitHub issues screen
// ==UserScript==
// @name Unassigned issues filter in GitHub
// @namespace
// @version 0.1
// @description Add unassigned issue link in issues filters
// @match https://github.com/*/*/issues*
// @copyright 2014+, Shady Sharaf <shady@sharaf.me>
// @see http://stackoverflow.com/questions/9711923/is-there-any-way-show-all-github-tickets-without-an-assignee
// ==/UserScript==
var fn = function(){
@shadyvb
shadyvb / us-github-notification-new-tab.js
Last active August 29, 2015 13:56
Open GitHub notification links in new tab
// ==UserScript==
// @name Open GitHub notification links in new tab
// @namespace
// @version 0.1
// @description Open GitHub Notifications in new tabs
// @match https://github.com/*/notifications*
// @copyright 2014+, Shady Sharaf <shady@sharaf.me>
// ==/UserScript==
jQuery(function($){
@shadyvb
shadyvb / p2-likes-to-fives.php
Created February 12, 2014 00:28
Change Like to Five! in P2 Likes plugin
/**
* Change text strings
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function p2_like2five( $translated_text, $text, $domain ) {
if ( 'p2-likes' != $domain ) {
return $translated_text;
}
switch ( $text ) {
# vagrant vsftp and other tricks
# from: https://ttboj.wordpress.com/2013/12/21/vagrant-vsftp-and-other-tricks/
# and
# Vagrant clustered SSH and 'screen'
# from: https://ttboj.wordpress.com/2014/01/02/vagrant-clustered-ssh-and-screen/
# for use inside a ~/.bashrc or similar
# copyright James Shubin, 2013, agplv.3+
### VAGRANT ###################################################################
# avoid needing to always add --provider=kvm
@shadyvb
shadyvb / vip-server.sh
Created March 1, 2014 13:15
vip-quickstart --server
# sudo apt-get update && sudo apt-get install git puppet -y && git clone https://github.com/Automattic/vip-quickstart.git /srv && cd /srv && bin/vip-init --server --domain=??
@shadyvb
shadyvb / webgrind-raise-important-queries.js
Created May 15, 2014 11:33
Bring up functions in theme files to the top in Webgrind
jQuery('a[title=Open file]').filter( function() { return jQuery(this).attr('href').match(/www\/wp-content\/themes\/vip\/shaw-globalnews\//) ; } ).each( function(){ jQuery(this).parents('tr').eq(0).prependTo( jQuery('table#function_table tbody') ); } )
@shadyvb
shadyvb / packer-install.sh
Last active August 29, 2015 14:01
Install packer for Archlinux
pacman -S base-devel fakeroot jshon expac git wget
wget https://aur.archlinux.org/packages/pa/packer/PKGBUILD
makepkg
pacman -U packer-*.pkg.tar.gz
@shadyvb
shadyvb / mu-plugin-profile-actions.php
Created May 19, 2014 12:57
mu-plugin to track timing of all actions/filters of a whitelisted list of tags ( or all of them! )
<?php
$xteam_profile_whitelisted_tags = array(
'save_post'
);
// Do action hack
function xteam_profile_all_action( $value ) {
global $wp_filter, $merged_filters, $wp_current_filter, $xteam_profile_whitelisted_tags;
$tag = end( $wp_current_filter );
@shadyvb
shadyvb / wp-globals.php
Created July 13, 2014 00:33
Globals in WordPress
<?php
$globals = array(
'comment',
'comment_alt',
'comment_depth',
'comment_thread_alt',
'wp_rewrite',
'in_comment_loop',
'wp_query',
@shadyvb
shadyvb / keybase.md
Last active August 29, 2015 14:04
keybase.md

Keybase proof

I hereby claim:

  • I am shadyvb on github.
  • I am shadysharaf (https://keybase.io/shadysharaf) on keybase.
  • I have a public key whose fingerprint is 0881 D3FC 2A71 1C95 01F4 C05C 61D6 DA92 65F2 1F5F

To claim this, I am signing this object: