Skip to content

Instantly share code, notes, and snippets.

View 20after4's full-sized avatar
🪫
charging batteries.

Mukunda Modell 20after4

🪫
charging batteries.
View GitHub Profile
@thcipriani
thcipriani / beta-scap-targets
Last active April 21, 2016 18:28
Shell script using dsh that updates the version of scap in beta cluster. This script assumes that you have dsh installed, and that it has a `beta-scap-targets` group
deployment-jobrunner01.deployment-prep.eqiad.wmflabs
deployment-mediawiki01.deployment-prep.eqiad.wmflabs
deployment-mediawiki02.deployment-prep.eqiad.wmflabs
deployment-mediawiki03.deployment-prep.eqiad.wmflabs
deployment-tmh01.deployment-prep.eqiad.wmflabs
deployment-tin.deployment-prep.eqiad.wmflabs
mira.deployment-prep.eqiad.wmflabs
@jamesabruce
jamesabruce / mysensors_humidity_relay_nonblocking.ino
Created December 11, 2015 16:11
MySensors Example - Humidity and Relay with Non-blocking Loop
/**
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* Copyright (C) 2013-2015 Sensnology AB
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
@Noitidart
Noitidart / _c-X11_XChangeProperty.c
Created January 10, 2015 12:19
_c-X11_XChangeProperty - C module that can be compiled with `gcc -o icon icon.c -L/usr/X11/lib -lX11` after installing `sudo apt-get install libx11-dev` which will set the icon of the window in the alt + tab menu and dock. [x11] [linux] [ubuntu]
#include <stdlib.h>
#include <X11/Xlib.h>
int main( int argc, char **argv )
{
unsigned int buffer[] = {16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,493470180,2556870889,3831546090,4267950572,4267951086,3781214700,2439496166,442675415,0,0,0,0,0,0,1391232293,1683398337,4115045318,4280718017,4281836996,4282562278,4283022571,4281906661,4282427859,4020292567,2057939348,4096,0,0,0,349729318,4259079973,4252858742,4284973170,4289174350,4283599734,4280067798,4280397793,268347868,4280128200,4285048260,4292861881,3083579497,0,0,0,1186092840,4292368678,4293095463,4293231141,4292907553,4281825418,4280061616,267754962,268016337,4279404997,4281301424,4293979332,4294108043,1307036176,0,0,2445565988,4293027109,4293029414,4293230118,4292904226,4292309057,4287856747,4279470531,4279598780,4279792821,4279788963,4288328365,4294962312,148790465,0,0,3855966499,4292894502,4292963110,4293162790,4293365539,4286866768,4280709289,4280054451,4279593130,268261785,267997068,4289442973,4294897046,3856053800,0,0,4241643555,4292762406,42
@atdt
atdt / phaste
Created November 10, 2014 19:40
paste to phabricator
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
phaste: Phabricator paste tool
"""
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
@frenchtoast747
frenchtoast747 / decorator.py
Last active July 4, 2019 17:13
A Python decorator that preserves everything about the original function being decorated.
import types
class decorator(object):
"""
When using a decorator, the function that is being decorated
loses its __name__, docstring, and signature.
For example, consider the generic decorator ``my_decorator``:
def my_decorator(fn):
me:
@true
a:
@true
sandwich:
@[ "$$(id -u)" -eq 0 ] && echo "Okay." || echo "What? Make it yourself."
.PHONY: me a sandwich
@ianhinder
ianhinder / git-submodule-fetch
Created March 20, 2014 15:25
Parallel submodule fetch
#!/bin/bash
set -e
set -u
if [ $# -eq 0 ]; then
git submodule -q foreach 'echo $name' | xargs -n 1 -P 10 git-submodule-fetch
else
while [ $# -gt 0 ]; do
(cd $1; git fetch -q || echo "Failed to fetch $1">&2)
@kolber
kolber / pandoras_vox.mdown
Created March 20, 2012 05:23
pandora’s vox: on community in cyberspace

pandora’s vox: on community in cyberspace

by humdog (1994)

when i went into cyberspace i went into it thinking that it was a place like any other place and that it would be a human interaction like any other human interaction. i was wrong when i thought that. it was a terrible mistake.

the very first understanding that i had that it was not a place like any place and that the interaction would be different was when people began to talk to me as though i were a man. when they wrote about me in the third person, they would say “he.” it interested me to have people think i was “he” instead of “she” and so at first i did not say anything. i grinned and let them think i was “he.” this went on for a little while and it was fun but after a while i was uncomfortable. finally i said unto them that i, humdog, was a woman and not a man. this surprised them. at that moment i realized that the dissolution of gender-category was something that was happening everywhere, and perhaps it was only just very obvious on the ne

@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@cdown
cdown / gist:1163649
Last active December 19, 2025 09:02
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in