Skip to content

Instantly share code, notes, and snippets.

View chrisma's full-sized avatar

Christoph Matthies chrisma

View GitHub Profile
@chrisma
chrisma / disable_guake_notifications.sh
Created December 12, 2017 17:10
Disable notifications on startup by Guake Terminal 0.8.8
guake --no-startup-script # Should give info on how to disable popups
# For Guake Terminal 0.8.8 the following command is used
gconftool-2 --type bool --set /apps/guake/general/use_popup false
@chrisma
chrisma / change_login_background.txt
Last active December 4, 2017 12:49
Change login screen background Ubuntu 17.10 using GDM
#http://ubuntuhandbook.org/index.php/2017/10/change-login-screen-background-ubuntu-17-10/
sudo cp ~/Pictures/landscape.png /usr/share/backgrounds/
xhost +local: && sudo gedit /etc/alternatives/gdm3.css
#lockDialogGroup {
background: #000000 url(file:///usr/share/backgrounds/landscape.png);
background-repeat: no-repeat;
background-size: cover;
background-position: center; }
@chrisma
chrisma / latex-cheatsheet-template.tex
Created September 22, 2017 11:52 — forked from alexander-yakushev/latex-cheatsheet-template.tex
Beautiful cheatsheet template for key bindings, compiled with XeLaTeX
\documentclass[10pt,english,landscape]{article}
\usepackage{multicol}
\usepackage{calc}
\usepackage[landscape]{geometry}
\usepackage{color,graphicx,overpic}
\usepackage[T1]{fontenc}
\usepackage[bitstream-charter]{mathdesign}
\usepackage[utf8]{inputenc}
\usepackage{url}
@chrisma
chrisma / api.py
Created May 8, 2017 15:13
Use an API in Python
from requests import get
# Some more ideas: https://www.programmableweb.com/category/humor/api
data = get('https://api.chucknorris.io/jokes/random').json()
joke = data['value']
print joke
@chrisma
chrisma / right_click_new.sh
Created May 5, 2017 10:16
Enable right-click file creation in nautilus
touch ~/Templates/txt.txt
touch ~/Templates/sh.sh
@chrisma
chrisma / getCache.js
Last active February 16, 2017 15:27 — forked from contolini/getCache.js
Adaptation of jQuery's $.getJSON() to use localStorage for caching. Supports invalidation after timeout.
/*
Return JSON from url, use browser's localStorage as cache
JQuery extension, returns a promise.
'cacheInvalidMs' indicates the milliseconds after which the cache is invalidated.
Default is 24 hours.
'cacheDelayMs' indicates the milliseconds after which data from the cache is returned.
Can be used to simulate the delay of normal requests.
Default is 0.
*/
//Adapted from https://gist.github.com/contolini/6115380
@chrisma
chrisma / todo_command.tex
Created August 3, 2016 13:25
Simple todo command for LaTeX using footnotes
% \todo command
\usepackage[usenames, dvipsnames]{color}
\newcommand{\todo}[1]{\colorbox{BurntOrange}{todo}\footnote{\textcolor{Bittersweet}{#1}}}
@chrisma
chrisma / soundboard.py
Last active April 25, 2017 15:02 — forked from lehmannro/soundboard.py
Video board for terminal use
#!/usr/bin/env python
import csv
import itertools
import os
import subprocess
import sys
import termios
import tty
import logging
@chrisma
chrisma / block_comments.tex
Last active July 25, 2016 13:29
Block comments for LateX
\documentclass{article}
\usepackage{verbatim} % includes the 'comment' environment
\begin{document}
displayed
\begin{comment}
the comment, not displayed.
\end{comment}
@chrisma
chrisma / keybase.md
Created June 15, 2016 15:32
Keybase Github proof

Keybase proof

I hereby claim:

  • I am chrisma on github.
  • I am chrisma (https://keybase.io/chrisma) on keybase.
  • I have a public key ASAsz-jG6Y-Tyakb1iZLKkkyPPubYYFa1rXf9khFFnTj4Ao

To claim this, I am signing this object: