Skip to content

Instantly share code, notes, and snippets.

@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!');
}
Verifying myself: My Bitcoin username is +raamdev. https://onename.io/raamdev
@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 + "=([^&#]*)";
<?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 / 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.
#

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 / browser-caching.htaccess
Created January 27, 2015 03:47
Enable Browser Caching for Apache (add this to the root .htaccess file on your site)
# Browser Caching
FileETag MTime Size
<IfModule expires_module>
ExpiresActive on
ExpiresDefault "access plus 1 week"
</IfModule>
@raamdev
raamdev / get.dev.sh
Last active November 2, 2015 08:21
Wildcard domains for development (*.dev) made simple, now with MacPorts support. See http://dev.sh for the original script.
#!/bin/sh
set -o errexit
set -e
# Fail fast if we're not on OS X >= 10.6.0.
if [ "$(uname -s)" != "Darwin" ]; then
echo "Sorry, DevDNS requires Mac OS X to run." >&2
exit 1
@raamdev
raamdev / f.lux-xcode-master-sha256.chk
Last active November 20, 2015 21:49
38f463ee5780a4f2b0160f9fa21dbe3c78c5d80d3c093e4ff553aaca230e2898 f.lux-xcode-master.zip
5dfb0ac3bd39f2830283cd0a5af534c43024207bbec460ca089b8edd595070fa ./.gitignore
a326fb9457de2a31fd23fb98d89f1e83dcab611ea7b85f671680094592e51c54 ./AppIcon29x29@2x.png
d276420548696edcc16610b578907305f54020763e065581f4aa5863b8585c61 ./AppIcon29x29@3x.png
adab888cd5d24313f142e9324f10ff7128d77cb30031122bb3586e333ef399a2 ./AppIcon40x40@2x.png
8fdc77ccf3964c31eb31777479a7ca5c3c056d873da610f2d9b75c99fc363ae9 ./AppIcon40x40@3x.png
eb6f6aa969998b2648ade1ee051d37f01032e6f549fc77b195bf7e4c53bf2624 ./AppIcon60x60@2x.png
626b2f4146996ab876396c4ab797b005801fdf59aa6b57e976386f0572772895 ./AppIcon60x60@3x.png
eadf312d966754f3b8d6542ea8a5db850bcceb81e6f971b7b629bc4b950b8644 ./en.lproj/fluxController_iPhone.nib
9261ecceda608ef174256e5fdc774c1e6e3dcf533409c1bc393d490d01c713f1 ./en.lproj/InfoPlist.strings
ca34f2dc83c31222a73a48053532ad901de55f014c58ffa2fbcf6c202b5448b0 ./flux.beta/AppDelegate.h
@raamdev
raamdev / postie-functions.php
Created March 21, 2013 19:51
Adds support for Post Formats to the WordPress Postie plugin. You can now specify a post format in the email subject like this: "Aside :: My Aside-formatted post". My changes to postie-functions.php can be found on lines L232, L305, L402, L803, and L2421.
<?php
/*
$Id: postie-functions.php 683869 2013-03-18 21:39:57Z WayneAllen $
*/
//to turn on debug output add the following line to wp-config.php
//define('POSTIE_DEBUG', true);
if (!function_exists('mb_str_replace')) {