Skip to content

Instantly share code, notes, and snippets.

View therealmarv's full-sized avatar
:octocat:

therealmarv

:octocat:
View GitHub Profile
@joewiz
joewiz / saxon-homebrew-macos-xquery.md
Last active April 7, 2022 16:50
Install saxon via homebrew for command line XQuery on macOS
@gwillem
gwillem / ansible-bootstrap-ubuntu-16.04.yml
Created June 16, 2016 21:59
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# gwillem@gmail.com
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
@ScalaWilliam
ScalaWilliam / output.json
Created December 22, 2015 12:21
json transform with xquery 3.1 (saxon 9.7) and xslt. Only doing it in xquery because want it self contained
{"stuff":{"more":["more stuff!",{"thing":"more stuff!"}]}}
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@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

@ericelliott
ericelliott / essential-javascript-links.md
Last active April 22, 2024 10:15
Essential JavaScript Links
@eyecatchup
eyecatchup / hammerhead-from-lrx21o-to-lrx22c.md
Last active November 1, 2023 08:35
A step-by-step guide how to manually flash the Android 5.0.1 (LRX22C) OTA-Update on a Nexus 5 with modified system (custom recovery/kernel, rooted, modified framework etc.)..

Update: For those interested, here's the version for updating from Android 5.1.0 (LMY47D/LMY47I) to Android 5.1.1 (LMY48B):
https://gist.github.com/eyecatchup/dab5cf7977008e504213


  UPDATE `NEXUS 5` 
     SET `VERSION`='5.0.1', `BUILD`='LRX22C', `RECOVERY`='CUSTOM', `ROOTED`=1 
   WHERE `VERSION`='5.0' && `BUILD`='LRX21O' && `RECOVERY`='CUSTOM' && `ROOTED`=1 
         && `WANNA_KEEP_USERDATA`=1;
@RickyCook
RickyCook / rsync.yaml
Created October 27, 2014 05:45
Ansible rsync changed status
# Uses the rsync change summary to figure out how many things changed, and uses that
# to tell Ansible if something changed or not
- name: sync hieradata
shell: rsync --delete -ri "/tmp/repo/hieradata" "/etc/puppet/hieradata" | awk '{print $1}' | grep -vE '..\.\..\.\.\.\.' | wc -l
register: hieradata_changes
changed_when: "hieradata_changes.stdout|int != 0"
@afolarin
afolarin / docker-log-gist.md
Last active March 16, 2023 13:02
docker-logs
@le-doude
le-doude / utility_functions.sql
Last active June 14, 2016 11:57
some functions I find extremely useful when working with jsons in postgresql 9.3
CREATE OR REPLACE FUNCTION public.json_append(data JSON, insert_data JSON)
RETURNS JSON
LANGUAGE SQL
AS $$
SELECT
('{' || string_agg(to_json(key) || ':' || value, ',') || '}') :: JSON
FROM (
SELECT
*
FROM json_each(data)