Skip to content

Instantly share code, notes, and snippets.


Marcus Ramsden mramsden

View GitHub Profile
mramsden / Bootstrap.php
Created Dec 27, 2009
This gist shows an approach to using Twig with the Zend Framework.
View Bootstrap.php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
/* Other functions may have been omitted */
protected function _initTwigView()
$twigView = new ZExt_Twig(APPLICATION_PATH, APPLICATION_PATH."/modules");
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper("ViewRenderer");
View gist:294659
<div id="manageable_id_2" class="ep_manageable">
<div class="ep_manageable_data">
<input id="manageable_id_2_check" type="checkbox"> <a href="http://wlbr.local/2/">ZeroWIN Vision Conference</a>
<div class="ep_manageable_controls">
<li>Manage Bookmark</li>
<li>Edit Resource</li>
<li>Delete Resource</li>
View gist:368292
<div id="manageable_id_102" class="ep_manageable">
<div class="ep_manageable_data">
<input type="checkbox" name="bulkaction_eprintids" value="102" id="select-102" class="ep_resource_manager_select_check">
<a href="http://resourcemanager.quango-vm.local/102/"><span class="ep_manageable_data_title">My New EdShare Resource</span></a>
<span class="ep_manageable_data_viewperms">Just me</span>
<div class="ep_manageable_controls">
<li><a href="http://resourcemanager.quango-vm.local/102/">View</a></li>
<li><a href="http://resourcemanager.quango-vm.local/cgi/users/home?screen=EPrint::Edit&amp;eprintid=102">Edit</a></li>
mramsden / NSDictionary+QueryStringBuilder.h
Created May 14, 2011
Creating a query string from an NSDictionary.
View NSDictionary+QueryStringBuilder.h
#import <Foundation/Foundation.h>
@interface NSDictionary (QueryStringBuilder)
- (NSString *)queryString;
mramsden / appstore.php
Created May 28, 2012 — forked from sebskuse/appstore.php
Simple PHP-CLI script to get number of ratings & stars of an app in the AppStore. Takes args from commandline & preset array.
View appstore.php
// Array of appstore ID's to always look up
$idArray = array(
$arguments = array_merge($idArray, array_slice($argv, 1) );
View gist:8003607
$(function() {
$(".sort_ajax").on("blur", function() {
var $this = $(this);
if ($this.attr("checked")) {
var data = {};
data.value = $this.siblings("[name='Style_code']").value();
$.post("Product_Range", data, function(data) {
}, html);
View gist:8020787
android {
defaultConfig {
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
buildTypes {
debug {
versionNameSuffix "-SNAPSHOT"
mramsden / 0_reuse_code.js
Created Jan 31, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
mramsden / Package.swift
Last active Oct 31, 2016
Getting started with Kitura on Heroku
View Package.swift
import PackageDescription
let package = Package(
name: "myFirstKituraProject",
dependencies: [
.Package(url: "", majorVersion: 1, minor: 0),
.Package(url: "", majorVersion: 1, minor: 0),
mramsden / main.swift
Created Oct 31, 2016
A simple Kitua app
View main.swift
import Foundation
import Kitura
import HeliumLogger
// Initialize HeliumLogger
// Create new router
let router = Router()