Skip to content

Instantly share code, notes, and snippets.

View SmallEndian's full-sized avatar

Jonathan Sid-Otmane SmallEndian

View GitHub Profile
@SmallEndian
SmallEndian / .vimrc
Created April 17, 2019 13:27
vimconfig
set nocompatible " be iMproved, required
set mouse=a
"Install plug plugin manager
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
@SmallEndian
SmallEndian / connect.erl
Last active February 27, 2019 17:55
Three DCs setup
#!/usr/bin/env escript
%%! -smp enable -sname erlshell -setcookie antidote
% Connect a list of nodes to each other
connect_nodes(Nodes)->
% Start the inter_dc on all nodes
io:format("Starting~n"),
[rpc:call(Node, inter_dc_manager, start_bg_processes, [stable]) || Node <- Nodes],
% Get a list of all DCs descriptors
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!-- Fri, 24 Feb 2006 Generated from KCHR: "French - numerical" -->
<!--Last edited by Ukelele version 3.0.1.47 on 2015-12-29 at 10:03 (GMT+10)-->
<keyboard group="126" id="-30741" maxout="1" name="French - numerical">
<layouts>
<layout first="0" last="0" mapSet="ANSI" modifiers="commonModifiers"/>
</layouts>
<modifierMap defaultIndex="0" id="commonModifiers">
<keyMapSelect mapIndex="0">
@SmallEndian
SmallEndian / Container.java
Created November 7, 2018 13:54
Some reflection on/about java
import java.io.File;
import java.lang.reflect.Field;
import java.net.URI;
public class Container extends File {
private String this_is_private;
protected String this_is_protected;
String this_is_package;
public String this_is_public;
@SmallEndian
SmallEndian / Makefile
Created June 7, 2018 12:34
Makefile with the equivalent of ls *.c
DOTS=$(wildcard *.dot)
.PHONY:all clean
all: $(DOTS:.dot=.ps)
clean: $(DOTS:.dot=.ps)
rm -f $^
%.ps: %.dot
dot -Tps $^ -o $@
@SmallEndian
SmallEndian / ErfWorld.js
Last active September 16, 2017 21:35
Eliminates the need to hunt for the 'Next Page' button in ErfWorld. Coz that was annoying!
// ==UserScript==
// @name ErfWorld Clicker!
// @namespace http://tampermonkey.net/
// @version 0.1
// @description The ErfWorld webcomic is nice. But I hate having to hunt the 'Next Page' button all the time. So now you can simply click on the current image to go to the next page!
// @author Jonathan Sid-Otmane
// @match http://archives.erfworld.com/*/*
// @grant none
// ==/UserScript==
@SmallEndian
SmallEndian / TamperMonkey.fanfiction.js
Created March 16, 2017 17:46
Fanfiction.net tamper
// ==UserScript==
// @name Fanfiction Click
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Allows me to click on fanfiction.net text
// @author Jonathan
// @match https://*.fanfiction.net/s/*
// @grant none
// ==/UserScript==