Skip to content

Instantly share code, notes, and snippets.

Avatar

Marcus Ramsden mramsden

View GitHub Profile
View Procfile
web: myFirstKituraProject
@mramsden
mramsden / main.swift
Created Oct 31, 2016
A simple Kitua app
View main.swift
import Foundation
import Kitura
import HeliumLogger
// Initialize HeliumLogger
HeliumLogger.use()
// Create new router
let router = Router()
@mramsden
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: "https://github.com/IBM-Swift/Kitura.git", majorVersion: 1, minor: 0),
.Package(url: "https://github.com/IBM-Swift/HeliumLogger.git", majorVersion: 1, minor: 0),
]
)
@mramsden
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
View gist:8020787
android {
defaultConfig {
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
}
buildTypes {
debug {
versionNameSuffix "-SNAPSHOT"
}
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) {
$("#crud_page").trigger("change");
}, html);
}
@mramsden
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
<?php
error_reporting(0);
// Array of appstore ID's to always look up
$idArray = array(
"428243918",
"442713833"
);
$arguments = array_merge($idArray, array_slice($argv, 1) );
@mramsden
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;
@end
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>
<div class="ep_manageable_controls">
<ul>
<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>
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>
<div class="ep_manageable_controls">
<ul>
<li>Manage Bookmark</li>
<li>Edit Resource</li>
<li>Delete Resource</li>
</ul>