Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am raamdev on github.
  • I am raamdev (https://keybase.io/raamdev) on keybase.
  • I have a public key whose fingerprint is 851B E08D AF38 F6A3 81D1 DF09 92A5 D3E8 7AF3 AA99

To claim this, I am signing this object:

@raamdev
raamdev / update-wp-child-theme-from-github.sh
Created December 30, 2014 17:06
Updates a WordPress theme with the latest code from GitHub
#!/bin/bash
# -------------------------------------------------------------------
#
# This script updates a WordPress theme with the latest code from
# GitHub. You can set it to run as a cronjob to automatically update
# a WordPress theme with the latest code from the master branch (or
# any branch that you want).
#
# Be sure to chmod +x this file so that it can be executed via Cron.
#
<?php
error_reporting(-1);
ini_set('display_errors', TRUE);
/* --- Config. section. ----------------------------------------------------------------------- */
$url = 'http://yoursite.com/'; // Swap this out when testing.
// Install the HTML Compressor locally, and change the following path as necessary.
require_once $_SERVER['WEBSHARK_HOME'].'/websharks/html-compressor/html-compressor/stub.php';
@raamdev
raamdev / raamdev-journal-s2-customizations.php
Created September 9, 2014 23:48
s2Member Pro-Form customizations that hide the username field and then auto-generate a username based on the email address. This was used for the Paid Journal subscription I ran on raamdev.com between 2011 and 2014.
<?php
add_action ("login_head", "s2_customize_login", 1000);
function s2_customize_login ()
{
?>
<script type = "text/javascript">
function getParameterByName(name)
{
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regexS = "[\\?&]" + name + "=([^&#]*)";
Verifying myself: My Bitcoin username is +raamdev. https://onename.io/raamdev
@raamdev
raamdev / test-ws-connection.php
Created July 12, 2014 22:33
Test connection to WebSharks-Inc.com Pro Plugin Updater; result of running this file should be "{"error":"Missing `data`."}"
<?php
error_reporting(-1);
ini_set('display_errors', TRUE);
function curl_download($Url){
// is cURL installed yet?
if (!function_exists('curl_init')){
die('Sorry cURL is not installed!');
}
" Settings
" https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh?hl=en
" Mappings
unmap r "Unmaps the 'r' key for Refresh, since that's used for other things, like GitHub R reply shortcut
@raamdev
raamdev / gist:45e8fca98365269f0cee
Created June 5, 2014 23:51
Custom Stylesheet for Link Library running on raamdev.com/resources/
.linktable {margin-top: 15px;}
.linktable a {text-decoration:none}
table.linklisttable {
width:100%;
border-width: 0px 0px 0px 0px;
border-spacing: 5px;
/* border-style: outset outset outset outset;
border-color: gray gray gray gray; */
@raamdev
raamdev / gist:33d257520050189aa421
Created May 28, 2014 21:24
fix social button alignment for sgclark.com
#menu-social ul li {
float: right;
}
@media only screen and (max-width: 1200px) {
#menu-social ul li {
float: none;
}
}
cd_pwd()
{
if [ $# -eq 0 ]; then
DIR="${HOME}"
else
DIR="$1"
fi
cd "${DIR}"
pwd