Skip to content

Instantly share code, notes, and snippets.

View jldevezas's full-sized avatar

José Devezas jldevezas

View GitHub Profile
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

#!/usr/bin/env python
#-*- coding:utf-8 -*-
import requests
from requests.auth import HTTPDigestAuth
def crud(graphStoreEndpoint, verb, graph, payload, auth):
function = {
"POST" : requests.post,
"PUT" : requests.put,
@patt0
patt0 / cbl.js
Last active March 7, 2024 20:12
ContinuousBatchLibrary is a Google Apps Script library that manages large batches and works around the 5 minute limitation of GAS execution. It does this by setting time based triggers in the future as well as memorising the last processed key in the batch in order to restart from the correct position. At the end of the batch a cleanup function …
/**
* --- Continous Execution Library ---
*
* Copyright (c) 2013 Patrick Martinent
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@stevenrombauts
stevenrombauts / progressbar.sh
Created February 26, 2014 14:37
Bash Progress Bar
#!/bin/bash
# Slick Progress Bar
# Created by: Ian Brown (ijbrown@hotmail.com)
# Please share with me your modifications
# Note: From http://stackoverflow.com/questions/11592583/bash-progress-bar
# Functions
PUT(){ echo -en "\033[${1};${2}H";}
DRAW(){ echo -en "\033%";echo -en "\033(0";}
WRITE(){ echo -en "\033(B";}
HIDECURSOR(){ echo -en "\033[?25l";}
@magthe
magthe / style.csl
Created September 10, 2014 19:34
CSL for pandoc-citeproc issue #81
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" page-range-format="minimal" default-locale="en-US">
<info>
<title>Journal of Combinatorics</title>
<id>http://www.zotero.org/styles/journal-of-combinatorics</id>
<link href="http://www.zotero.org/styles/journal-of-combinatorics" rel="self"/>
<link href="http://www.e-publications.org/intlpress/support/" rel="documentation"/>
<author>
<name>Alafate Julaiti</name>
<email>arapat@arap.at</email>
@yuttie
yuttie / user.js
Created June 9, 2015 13:40
Optimizations for Firefox on Linux
// Force-enable hardware acceleration.
// Setting MOZ_USE_OMTC=1 is necessary.
// http://en.librehat.com/blog/force-enable-hardware-acceleration-in-firefox-on-linux/
user_pref("webgl.force-enabled", true);
user_pref("layers.acceleration.force-enabled", true);
user_pref("layers.offmainthreadcomposition.enabled;true", true);
user_pref("layers.offmainthreadcomposition.async-animations", true);
// Force-enable Skia backend for Azure
// https://bugzilla.mozilla.org/show_bug.cgi?id=740200#c44
@CMCDragonkai
CMCDragonkai / combinatorial_explosion.md
Last active January 8, 2024 16:40
Algorithms: Combinatorial Explosion

Combinatorial Explosion

A combinatorial explosion refers to an exponential or polynomial increase in complexity depending on the number of input variables and the states of those input variables.

The first simple example is imagine we have n variables with Z possible states for each variable.

@cboettig
cboettig / docker-compose.yml
Last active December 31, 2023 15:23
debugging NGINX configuration for Jupyter
jupyter:
image: jupyter/datascience-notebook
environment:
- PASSWORD=${PASSWORD}
nginx:
image: nginx
links:
- jupyter
@yig
yig / latexmk-fast
Created January 15, 2016 04:36
Runs latexmk in draft mode (fastest) followed by a batch mode (actually generate the PDF).
#!/bin/bash
## Simple draft mode followed by pdflatex once by using the print hook.
## With no arguments, it will follow a 'latexmkrc' file if there is one.
## You still get the nice error messages at the end:
latexmk -pdf -pdflatex='pdflatex -draftmode %O %S && touch %D' -print=pdf -e '$lpr_pdf=q|pdflatex -interaction=batchmode -synctex=1 %R|' "$@"