Skip to content

Instantly share code, notes, and snippets.

View jorisvddonk's full-sized avatar

Joris van de Donk jorisvddonk

View GitHub Profile
@jorisvddonk
jorisvddonk / fabfile.py
Created August 6, 2013 06:57
Fabric test case
from fabric.api import *
import fabric
import os
def test_func():
print "Fabric version: %s" % fabric.version.get_version()
with shell_env(foo="bar", baz="qux"):
# Echo the 'foo' and 'baz' environment variables:
if os.name == 'posix':
local("env | grep foo")
@jorisvddonk
jorisvddonk / windows_cmd_result
Created August 6, 2013 06:58
Fabric test case failure (test case: https://gist.github.com/jorisvddonk/6162658) on Windows
C:\Users\joris>fab test_func
Fabric version: 1.7.0
[localhost] local: set foo
foo="bar" SET baz="qux"
[localhost] local: set baz
Environment variable baz not defined
Fatal error: local() encountered an error (return code 1) while executing 'set baz'
Aborting.
@jorisvddonk
jorisvddonk / linux_cmd_result
Created August 6, 2013 06:59
Fabric test case success (test case: https://gist.github.com/jorisvddonk/6162658) on Linux
joris@vagrant:~$ fab test_func
Fabric version: 1.7.0
[localhost] local: env | grep foo
foo=bar
[localhost] local: env | grep baz
baz=qux
Done.
---
- hosts: all
sudo: True
tasks:
- name: Install package via apt
apt: pkg=mc
@jorisvddonk
jorisvddonk / scriptInjector.js
Created March 19, 2015 20:51
ScriptInjector Chrome snippet - WIP
/*
* ScriptInjector-snippet
* Copyright (c) 2015 Joris van de Donk
* Snippet that can be used to inject JavaScript and CSS into a page.
* Uses cdnjs.com's CDN and APIs.
* Licensed under the MIT license.
* Very WIP as of yet ;)
*/
(function() {
@jorisvddonk
jorisvddonk / gist:e7e2d0bab78ec1e22634
Created April 28, 2015 16:42
Example custom operators for Mingo
/*
$pluck is a pipeline operator which returns the result of resolving `expr` on each item in the collection.
This allows you to 'boil down' a collection to just the values you're interested in.
Example:
Mingo.aggregate(grades_complex, [{$unwind: "$scores"}, {$pluck: "scores.score"}]);
returns an array of all scores in the 'grades_complex' dataset: [57.92947112575566, 21.24542588206755, 68.1956781058743, 67.95019716560351, 18.81037253352722, 39.17749400402234, ...]
*/
Mingo.addOperators(Mingo.OP_PIPELINE, function(m) {
return {
@jorisvddonk
jorisvddonk / sci_fi_recommended_reading.md
Last active January 27, 2020 21:28
Some sci-fi readables I enjoyed
@jorisvddonk
jorisvddonk / index.html
Last active January 31, 2018 12:36
Utomik Rad van Fortuin (MOVED TO GITLAB & SURGE.SH)
<html>
<head>
<meta http-equiv="refresh" content="0;URL='http://utomik-wheel-of-fortune.surge.sh'">
<script type="text/javascript">
window.location.href='http://utomik-wheel-of-fortune.surge.sh';
</script>
</head>
<body>
Hello, this page has moved to <a href="http://utomik-wheel-of-fortune.surge.sh">http://utomik-wheel-of-fortune.surge.sh</a>.
</body>
@jorisvddonk
jorisvddonk / README.md
Last active January 18, 2017 08:14
Utomik Game browser - JSONETTE app

This is a very basic Utomik game browser for your smartphone! It's built using Jasonette. I spent about 30 minutes on it from the moment I heard about Jasonette.

How to use

  1. Install Jason, the jsonette viewer on your iOS/Android phone. NOTE: For Android, you might want to install this more up to date version of the viewer instead.
  2. Open Jason
  3. In Jason, where it says 'enter a valid jason url', enter the raw URL to the .json file in this gist, then hit 'Go'.
  4. Tap on 'Utomik game browser' and SEE GAMES. Wow. Such amaze.