Skip to content

Instantly share code, notes, and snippets.

View felix11h's full-sized avatar

Felix Hoffmann felix11h

View GitHub Profile
@felix11h
felix11h / GoogleDocsBackup.gs
Created November 20, 2019 14:48 — forked from brokensandals/GoogleDocsBackup.gs
Google Docs/Sheets/Slides automated backups script
var BACKUP_FOLDER_ID = 'INSERT_FOLDER_ID_HERE';
var NATIVE_MIME_TYPES = {};
NATIVE_MIME_TYPES[MimeType.GOOGLE_DOCS] = MimeType.MICROSOFT_WORD;
NATIVE_MIME_TYPES[MimeType.GOOGLE_SHEETS] = MimeType.MICROSOFT_EXCEL;
NATIVE_MIME_TYPES[MimeType.GOOGLE_SLIDES] = MimeType.MICROSOFT_POWERPOINT;
var NATIVE_EXTENSIONS = {};
NATIVE_EXTENSIONS[MimeType.GOOGLE_DOCS] = '.docx';
NATIVE_EXTENSIONS[MimeType.GOOGLE_SHEETS] = '.xlsx';
@felix11h
felix11h / annotate_gif.sh
Created March 9, 2018 11:55
Add annotation to GIFs with Imagemagick
#!/bin/sh
## manullay find frame in which caption should change
# mkdir frames_s01
# convert -coalesce source_01.gif frames_s01/out%05d.gif
mkdir tmp/
convert source_01.gif[0-50] tmp/tm01.gif
convert source_01.gif[51-100] tmp/tm02.gif
@felix11h
felix11h / rvs_test.py
Created December 9, 2016 19:19
SciPy memory usage problems with rv_continuous
import resource
from scipy.stats import rv_continuous
class Rv(rv_continuous):
def __init__(self, x):
rv_continuous.__init__(self, a=0, b=1)
self.x = x
def _pdf(self, y):
@felix11h
felix11h / snippy.sh
Created March 12, 2016 21:29 — forked from opennomad/snippy.sh
Various scripts
#!/usr/bin/env bash
# video demo at: http://www.youtube.com/watch?v=90xoathBYfk
# written by "mhwombat": https://bbs.archlinux.org/viewtopic.php?id=71938&p=2
# Based on "snippy" by "sessy"
# (https://bbs.archlinux.org/viewtopic.php?id=71938)
#
# You will also need "dmenu", "xsel" and "xdotool". Get them from your linux
# distro in the usual way.
#
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl