Skip to content

Instantly share code, notes, and snippets.

View jucor's full-sized avatar

Julien Cornebise jucor

View GitHub Profile
@markwk
markwk / pdf_toc_processor.py
Created October 3, 2019 19:30
Append a Table of Contents (TOC) to a PDF Document on Mac using Only Python and No External Dependencies
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
#############################
#
# Append a Table of Contents (TOC) to a PDF Document on Mac using Python
#
# This script involves no external dependencies. Works and tested on Mac's default version of Python.
#
# Usage: python pdf_toc_processor.py -i <path-to-target.pdf> -b <path-to-bookmarks-file.txt> -o <path-to-output.pdf>
@simonjbeaumont
simonjbeaumont / tmup
Last active October 13, 2021 11:03
Update bash to latest tmux environment on reattaching.
#!/bin/bash
tmup ()
{
echo -n "Updating to latest tmux environment...";
export IFS=",";
for line in $(tmux showenv -t $(tmux display -p "#S") | tr "\n" ",");
do
if [[ $line == -* ]]; then
unset $(echo $line | cut -c2-);
@aaronzirbes
aaronzirbes / shrink-git-repo.sh
Created January 19, 2013 05:32
This script will help you remove large files from your git repo history and shrink the size of your repository.
#!/bin/bash
echo "Finding and Purging Big Files From Git History"
echo "=============================================="
echo ""
echo "http://naleid.com/blog/2012/01/17/finding-and-purging-big-files-from-git-history/"
echo ""
pushd "$(git rev-parse --show-toplevel)" > /dev/null
@perky
perky / ProFi.lua
Created May 30, 2012 20:32
ProFi, a simple lua profiler that works with LuaJIT and prints a pretty report file in columns.
--[[
ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php.
Example:
ProFi = require 'ProFi'
ProFi:start()
some_function()
another_function()
coroutine.resume( some_coroutine )
ProFi:stop()
@Echos
Echos / pdftk.rb
Created March 3, 2012 02:29
Homebrew PDFTK for OSX Lion
require 'formula'
class Pdftk < Formula
url 'http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-1.44-src.zip'
homepage 'http://www.pdflabs.com/'
md5 '9eb50fffcd621a627d387750c60982b4'
depends_on 'gcc' # with "--enable-java" option , required "Homebrew-alt" .
# via : https://github.com/adamv/homebrew-alt/
def install