Skip to content

Instantly share code, notes, and snippets.

View nilskoppelmann's full-sized avatar
👨‍💻

Nils Koppelmann nilskoppelmann

👨‍💻
View GitHub Profile
@nilskoppelmann
nilskoppelmann / gnomeWinBtn.sh
Created January 13, 2015 19:45
Gnome Button Window Buttons Arrangement --- tested with Debian
#!/bin/bash
echo "Layouts:"
echo "1) x - +"
echo "2) x + -"
echo "3) - x +"
echo "4) - + x"
echo "5) + - x"
echo "6) + x -"
## asking for choice
read -p "Which layout do you want? " "entry"
#!/bin/bash
while getopts "" opt; do
case $opt in
\?)
printf >&2 \
"invalid option: -$OPTARG\n
usage: toMp3 [-t type]\n"
exit 1;;
:)
echo >&2 \
@nilskoppelmann
nilskoppelmann / loop.sh
Last active August 29, 2015 13:56
mplayer infinite loop
#!/bin/bash
mplayer -loop 0 "$1"
@nilskoppelmann
nilskoppelmann / nl2br.pl
Created December 23, 2013 20:16
Perl Equivalent to PHP's nl2br
#!/usr/bin/perl
use strict;
use warnings;
sub nl2br {
my $t = shift || return;
$t =~ s/([\r])/<br>/g;
return $t;
}
@nilskoppelmann
nilskoppelmann / delSwap.sh
Last active December 31, 2015 14:39
Delete all swap files generated by vim.
rm .*.sw*
git rm -r --cache ./*/*.sw*
@nilskoppelmann
nilskoppelmann / canvas.html
Created October 27, 2013 23:13
Fiddling around with HTML5 Canvas.
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
canvas { border: 1px solid gray; }
</style>
<script>
function draw() {
var canvas = document.getElementById('house');
@nilskoppelmann
nilskoppelmann / README.md
Last active December 20, 2015 15:59
Little Demonstration of what CSS3 can do.

CSS3retro

a CSS Snippetcollection

This Snippetcollection contains a few nice ways to use CSS3 to get astounding RETRO Gaming Symbols.

Usage

include the styles.css file in your HTML-Head just like that:

@nilskoppelmann
nilskoppelmann / update.py
Created August 5, 2013 18:44
Update Scripts for Debian (or Ubuntu) with various options in python and shell.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# cc 2012 by Nils Koppelmann
import os
bold = "\033[1m" #declares the string as bold
reset = "\033[0;0m" #resets the string to normal