Skip to content

Instantly share code, notes, and snippets.

View skopp's full-sized avatar

Rashaad Essop skopp

View GitHub Profile
@skopp
skopp / BoxBillingApi.php
Created November 5, 2012 20:33 — forked from boxbilling/BoxBillingApi.php
BoxBilling API class for PHP
<?php
/**
* BoxBilling
*
* LICENSE
*
* This source file is subject to the license that is bundled
* with this package in the file LICENSE.txt
* It is also available through the world-wide-web at this URL:
* http://www.boxbilling.com/LICENSE.txt
@skopp
skopp / index.html
Created November 9, 2012 20:22 — forked from moski/index.html
Script to include in your blogger posts to enable gist embeds.
<script src="https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script>
@skopp
skopp / template.html
Created November 9, 2012 20:23 — forked from moski/template.html
Gist embed template
<div class="gistLoad" data-id="GistID" id="gist-GistID">Loading ....</div>
@skopp
skopp / data-markdown.user.js
Created November 27, 2012 13:40 — forked from paulirish/data-markdown.user.js
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@skopp
skopp / create_repo.py
Created November 28, 2012 04:26 — forked from jkeesh/create_repo.py
Python script to create a remote git repo that checks out the latest commit with a post-receive hook
#
# This script creates a repository and sets it up with a post receive
# hook that checks out the code to the desired directory.
#
# Really nice for setting up an easy way to push code to a remote
# server without lots of overhead.
#
# After running this script simply add a remote locally like
#
# git remote add web ssh://you@server/path/to/repo.git
@skopp
skopp / gapps.js
Created December 18, 2012 11:08 — forked from labnol/gist:1907316
Google Apps Script to fill in a Document template with Spreadsheet data - via @labnol
function onOpen() {
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}];
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addMenu("Fitness Diaries", menuEntries);
}
function createDocFromSheet(){
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries
// get the data from an individual user
function doGet(e){
// get some variables passed from the querystring
var project = e.parameter.title;
var range = e.parameter.range;
var sheet = e.parameter.sheet;
// Grab a basic html template to fill in the blanks - see https://developers.google.com/apps-script/html_service
var t = HtmlService.createTemplateFromFile("reportTemplate");
// some bits of code to grab the source urls
var doc = SpreadsheetApp.openById(ScriptProperties.getProperty('active'));
// Do whatever you'd like with the script! Show it off, mod it up, post it places, or whatever. :)
// (If you do, I wouldn't mind a Twitter shoutout at @_slinehan when appropriate!)
$imageURL = "URL HERE";
$image = imagecreatefromjpeg($imageURL);
$width = imagesx($image);
$height = imagesy($image);
// First, let's resize the image to something manageable while maintaining aspect ratio.
@skopp
skopp / index.html
Created December 18, 2012 13:10 — forked from labnol/index.html
<div id="wrapper">
<form id="paper" method="get" action="">
<div id="margin">Title: <input id="title" type="text" name="title"></div>
<textarea placeholder="Enter something funny." id="text" name="text" rows="4" style="overflow: hidden; word-wrap: break-word; resize: none; height: 160px; "></textarea>
<br>
<input id="button" type="submit" value="Create">
</form>
</div>
@skopp
skopp / coderwall.coffee
Last active December 10, 2015 01:49 — forked from optikfluffel/coderwall.coffee
Minor edits
# Display your coderwall.com badges without using a library like jQuery
# CONFIGURE your username
username = #'change me' - remove hashtag after changing and delete this helper text
url = "http://www.coderwall.com/#{username}.json?callback=processJSON"
loadJSON = (url) ->
head = document.getElementsByTagName('head')[0]
newScript = document.createElement('script')