Skip to content

Instantly share code, notes, and snippets.

View lvnilesh's full-sized avatar
💭
🏆 Vibranium Status Level

LV Nilesh lvnilesh

💭
🏆 Vibranium Status Level
View GitHub Profile
<?php
add_filter('tribe_events_eb_request', 'tribe_fix_eb_organizer_website', 10, 3);
function tribe_fix_eb_organizer_website( $request, $action, $params ){
if ( strpos( $action, 'organizer' ) !== false ) {
$params_array = array();
parse_str( $params, $params_array );
if ( $params_array['name'] == 'My Organizer' ) { // replace 'My Organizer' with the name of your organizer
$params_array['description'] = 'Put what you want in the organizer description here'; // customize this text
}
#!/usr/bin/env bash
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}
@lvnilesh
lvnilesh / config.ru
Last active August 29, 2015 14:04 — forked from brookr/config.ru
wordpress in pow
# config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/
# added hackery to work around wordpress issues - Patrick Anderson (patrick@trinity-ai.com)
# clearly this could be cleaner, but it does work
require 'rack'
require 'rack-legacy'
require 'rack-rewrite'
# patch Php from rack-legacy to substitute the original request so
# WP's redirect_canonical doesn't do an infinite redirect of /
# config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/
# added hackery to work around wordpress issues - Patrick Anderson (patrick@trinity-ai.com)
# clearly this could be cleaner, but it does work
require 'rack'
require 'rack-legacy'
require 'rack-rewrite'
# patch Php from rack-legacy to substitute the original request so
# WP's redirect_canonical doesn't do an infinite redirect of /

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

---
## build-version.yml
#
# Use with ansible bringup;
# - *_version specs can be branches, tags, or commits
# - you can comment out any items you do not want to override;
# they will retain their settings as in ansible playbooks
# for those items.
#
"""
Implementation 2CheckOut by ManyRoots.com
"""
import hmac
import binascii
import re
import json
import uuid
"""
Implementation 2CheckOut by ManyRoots.com
"""
import hmac
import binascii
import re
import json
import uuid

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@lvnilesh
lvnilesh / lb-wordpress-btsync-mysql.yml
Last active August 29, 2015 14:26 — forked from borjaburgos/lb-wordpress-btsync-mysql.yml
A Stackfile for a load-balanced and horizontally scalable Wordpress with volume synchronization using btsync
# The load-balancer, gets deployed anywhere
lb:
image: 'tutum/haproxy:latest'
links:
- wordpress
ports:
- '80:80'
restart: always
roles:
- global