Skip to content

Instantly share code, notes, and snippets.

View TheTaylorHicks's full-sized avatar

Taylor Hicks TheTaylorHicks

  • Melbourne, Australia
View GitHub Profile
@Nourz1234
Nourz1234 / anonymous_class.py
Last active February 14, 2024 11:41
Introducing new features into python! block scopes using curly braces, commas (instead of semicolons), multiline lambdas/anonymous functions, anonymous classes, "This" and "Base" keywords instead of "self" and "super", code minification, more commas, non-indentation sensitive code and more!
from madness import *
main = Function(lambda: {
# anonymous classes!
# notice the use of the magical keyword "This"
Person := Class(Object) (
"Person", # Optional class name
__init__ = lambda name, age: {
@robertdale
robertdale / describe.groovy
Last active September 27, 2019 07:10
JanusGraph Schema Describe Command
// This can be imported via ./bin/gremlin.sh -i describe.groovy
// A variable 'graph' must be defined with a JanusGraph graph
// Run it as a plugin command ':schema'
// :schema describe
//
import org.janusgraph.graphdb.database.management.MgmtLogType
import org.codehaus.groovy.tools.shell.Groovysh
import org.codehaus.groovy.tools.shell.CommandSupport
@jcushman
jcushman / example.sql
Created February 9, 2017 19:40
Store JSON history with the fast-json-patch library and Postgresql triggers
-- Enable pl/v8:
CREATE EXTENSION plv8;
-- Create json history table:
CREATE TABLE json_history (id BIGSERIAL PRIMARY KEY, tstamp timestamp DEFAULT now(), table_name text, column_name text, target_id bigint, transform json);
-- Create test table:
CREATE TABLE test_json (id BIGSERIAL PRIMARY KEY, data JSON);
-- Enable history tracking on test_json.data:
@andrealbinop
andrealbinop / setup-modernie-vagrant-boxes.md
Last active May 28, 2023 01:54
Setup modern.ie vagrant boxes

Setup modern.ie vagrant boxes

Since modern.ie released vagrant boxes, it' no longer necessary to manually import the ova file to virtualbox, as mentioned here.

However, the guys at modern.ie didn't configured the box to work with WinRM. This how-to addresses that, presenting steps to proper repackage these boxes, adding WinRM support. Additionally configures chocolatey package manager and puppet provisioner.

Pre-requisites