Skip to content

Instantly share code, notes, and snippets.

robmint / cat.js
Created May 31, 2022 05:34
cat javascript for Luna
View cat.js
function Cat() { // cat factory, called a Constructor
this.furry = true; // this is the info that every cat has to start with = ""; // but can be changed
this.legs = 4;
cat = []; // make a new list of cats: [] means a numbered list starting at 0
for(var i=0; i<5; i++) { // go through the list creating 5 cats
cat[i] = new Cat(); // use the Cat() factory to make a new cat and store it in the list of cats
View gist:bc06c432d5e287c1be1f00c9f67aa184

Keybase proof

I hereby claim:

  • I am robmint on github.
  • I am vdu23 ( on keybase.
  • I have a public key ASD-ozCiOx9vjli7JZRMU9UqiRfUAbfbJUSrATpy5BfZiwo

To claim this, I am signing this object:

View gist:644853d98956ccc646f887860a70ada9
Verifying that +robcarter is my blockchain ID.
robmint /
Last active April 28, 2019 07:43
Inform 7 cheatsheet

Global values - values that vary

Start is a room. "You are at the start of the game. [if the era is the past] In the past[otherwise] In the present[end if]."
The time machine is a thing in the start.
Instead of examining the time machine:
	say "You feel your mind drifting...";
	now the era is the past.

Openable things that change when you open them

robmint / nzbcx-private-api-call.php
Created June 5, 2016 00:22
Connect to the NZBCX bitcoin exchange via private API call
View nzbcx-private-api-call.php
$key = ''; // fill in these details
$secret = '';
$id = '';
// Nonce of the current Unix timestamp string encoded
$nonce = strval(time());
$sigtext = $nonce . $id . $key;
$signature = hash_hmac ('sha256',$sigtext,$secret);
robmint / raygun2curl.rb
Last active June 13, 2016 22:16
Parse RayGun raw json data into a curl command
View raygun2curl.rb
#!/usr/bin/env ruby -w
require 'rubygems'
require 'json'
#local = "localhost:3000"
local = false
json =[0])
obj = JSON.parse(json)
robmint /
Last active June 1, 2016 21:44
Git cheatsheet

Show branches still to be merged to master

git fetch
git branch --no-merged master

Create new branch and switch to it

robmint / messages.rb
Last active May 9, 2016 01:38
ruby singleton pattern
View messages.rb
require 'yaml'
module Valet
class Messages
@messages ||= YAML::load_file(File.expand_path('../../../messages.yml', __FILE__))
def self.text(key)
robmint / template.js
Created February 21, 2016 22:18
Unique keys in data structures with handlebars templating
View template.js
// typical input data
// Years and semesters need to be unique so they are stored as keys
var data = {
count: 2,
found: 5,
results: {
'2011': {'Semester 1': {url: ''}},
'2012': {
'Semester 1': {url: ''},
robmint / example.xml
Last active February 17, 2016 02:42
Adding custom fields to a Solr schema to enable sorting and grouping
View example.xml
<!-- typical filesystem location ../config/spring/api/discovery.xml -->
<!-- sort filters for the discovery search-->
<property name="searchSortConfiguration">
<bean class="org.dspace.discovery.configuration.DiscoverySortConfiguration">
<property name="defaultSortOrder" value="desc"/>
<property name="sortFields">
<ref bean="sortTitle" />
<ref bean="sortDateIssued" />
<ref bean="sortSomeField" />