Skip to content

Instantly share code, notes, and snippets.

@silvasur
silvasur / rotationen.m
Created November 16, 2012 19:36
Rotations/Quaternionsfunktioen für Octave/MATLAB
% DISCLAIMER: Nur in Octave getestet. Könnte auch in MATLAB funktionieren, muss aber nicht...
% Achse-Winkeldarstellung zu Rotationsmatrix.
function rv = achsewinkel_to_rotmatrix(achse, winkel)
x = achse(1);
y = achse(2);
z = achse(3);
c = cos(winkel);
s = sin(winkel);
omc = 1-c;
@silvasur
silvasur / aurfetch.py
Last active October 11, 2015 13:37
Yet another AUR package downloader...
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# aurfetch.py - My small helper script for fetching AUR packages and automatically update them
# It doesn't do the fancier stuff like automagically fetch dependencies.
# Have fun :-)
#
# License: [Do What The Fuck You Want To Public License](http://en.wikipedia.org/wiki/WTFPL)
###### START EDITING HERE
@silvasur
silvasur / fb_dont_show_sidebar.css
Created July 7, 2011 11:49
Get rid of the stupid chat sidebar at facebook.com
.fbChatSidebar {
display: none !important;
}
/*
Installation instructions:
Opera:
1. Open Preferences, go to Advanced > Content > Style Options > Presentation mode and check Author mode : My style sheet
2. Go to Facebook,right-click on the page background and click "Edit Site Preferences".
@silvasur
silvasur / backup-bitcoins.sh
Created April 10, 2011 11:54
Easily create encrypted backups of your Bitcoin wallet
#!/bin/bash
# backup-bitcoins.sh - Easily create encrypted backups of your Bitcoin wallet
# You need this tools / programs to run backup-bitcoins.sh:
# * 7z (usually in the package 7zip)
# * uuidgen (usually already installed)
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
@silvasur
silvasur / tidy-up-youtube.css
Created April 9, 2011 19:09
Tidy up the youtube homepage, i.e. remove the right sidebar and the "most popular" videos.
/*
* Tidy up the youtube homepage, i.e. remove the right sidebar and the "most popular" videos.
*/
#homepage-side-content, #feed_top_videos, #feed_top_videos-content, .top-videos-module {
display: none !important;
}
@silvasur
silvasur / jpeginjector.sh
Created March 26, 2011 20:56
Easily inject files into jpeg files (using the comment tag in the EXIF data)
#!/bin/bash
# jpegincector.sh - Easily inject files into jpeg files (using the comment tag in the EXIF data)
# You need this tools / programs to run jpeginjector.sh:
# * uuencode/uudecode (usually found in the sharutils package)
# * exiftool (usually found in the perl-Image-ExifTool package)
# * uuidgen (usually already installed)
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
@silvasur
silvasur / gmail2opera.py
Created February 25, 2011 19:27
Convert GMails CSV contacts to Operas propertiary format.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# gmail2opera.py
# Copyright (c) 2010 Kevin Chabowski
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@silvasur
silvasur / tetris.py
Last active January 22, 2024 21:49
Tetris implementation in Python
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
# Very simple tetris implementation
#
# Control keys:
# Down - Drop stone faster
# Left/Right - Move stone
# Up - Rotate Stone clockwise
# Escape - Quit game