Skip to content

Instantly share code, notes, and snippets.

View john2x's full-sized avatar
👨‍👩‍👦‍👦

John Louis Del Rosario john2x

👨‍👩‍👦‍👦
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am john2x on github.
  • I am john2x (https://keybase.io/john2x) on keybase.
  • I have a public key ASCY-Xaf7jXGFun16lwCT2cOacnua4JMadfA1rtR4r_tZgo

To claim this, I am signing this object:

@john2x
john2x / offlineimap-notify.sh
Last active January 20, 2023 03:18 — forked from nlamirault/gist:38cfc46682eaeb28709e
offlineimap-notify.sh
View offlineimap-notify.sh
#!/bin/bash
usage="usage: $(basename "$0") [-hn] ACCOUNT
Check an offlineimap account's mail directory for new messages and trigger notification
where:
-h show this help text
ACCOUNT the offlineimap account name"
View gist:e6a70aafcd208e1f9a88
class Container(object):
def __init__(self, items):
self.items = items # items is a list or tuple
def __len__(self):
return len(self.items)
def __getitem__(self, i):
return self.items[i]
@john2x
john2x / 00_destructuring.md
Last active September 15, 2023 18:28
Clojure Destructuring Tutorial and Cheat Sheet
View 00_destructuring.md
View tox.ini
[flake8]
max-line-length=120
exclude=backend/tests/*,backend/lib/*
@john2x
john2x / uwsgi-emperor
Last active May 19, 2016 23:41
uWSGI Emperor init script (Ubuntu 12.04)
View uwsgi-emperor
#!/bin/sh
### BEGIN INIT INFO
# Provides: uwsgi-emperor
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the uwsgi emperor app server
# Description: starts uwsgi app server using start-stop-daemon
View tmux cheatsheet.md

screenshot

(prefix == Ctrl+f)

Panes

Navigation

(vim movement keys)
prefix h

prefix j

@john2x
john2x / flatui.vim
Last active December 21, 2015 16:59
View flatui.vim
" flatui.vim - Vim color scheme
" ----------------------------------------------------------
" Author: John Louis Del Rosario (http://john2x.com/)
" Version: 0.1
" License: Creative Commons Attribution-NonCommercial
" 3.0 Unported License (see README.md)
" ----------------------------------------------------------
" Setup ----------------------------------------------------{{{
" Reset syntax highlighting
View flatui.vim
" Vim color file flatui2
" generated by VimTax http://www.vimtax.com
set background=light
hi clear
if exists("syntax_on")
syntax reset
endif
set t_Co=256
let colors_name = "flatui2"
@john2x
john2x / github.vim
Created August 24, 2013 07:32
Github colors for Vim
View github.vim
" Vim color file
"
" Original Author: Anthony Carapetis <anthony.carapetis@gmail.com>
" Author: John Louis Del Rosario @john2x
"
" Note: Based on github's syntax highlighting theme
" Used Brian Mock's darkspectrum as a starting point/template
" Thanks to Ryan Heath for an easy list of some of the colours:
" http://rpheath.com/posts/356-github-theme-for-syntax-gem
"