Skip to content

Instantly share code, notes, and snippets.

View wrzlbrmft's full-sized avatar

Matthias wrzlbrmft

  • Munich, Germany
View GitHub Profile
@wrzlbrmft
wrzlbrmft / scan-dvb-for-vlc.txt
Created January 5, 2016 21:03
Scan DVB channels for VLC.
w_scan -X -F -t 3 > channels.conf
@wrzlbrmft
wrzlbrmft / xfce-hide-hibernate-suspend-etc.txt
Last active June 28, 2023 12:17
Hide Hibernate, Suspend, etc. option from the XFCE shutdown dialog.
# as normal user
xfconf-query -c xfce4-session -np '/shutdown/ShowHibernate' -t 'bool' -s 'false'
xfconf-query -c xfce4-session -np '/shutdown/ShowSuspend' -t 'bool' -s 'false'
xfconf-query -c xfce4-session -np '/shutdown/ShowHybridSleep' -t 'bool' -s 'false'
xfconf-query -c xfce4-session -np '/shutdown/ShowSwitchUser' -t 'bool' -s 'false'
@wrzlbrmft
wrzlbrmft / crop-video.txt
Created December 30, 2015 12:44
Crop video to a given time range.
# starting at 00:00:00, duration of 00:00:30 (hh:mm:ss)
ffmpeg -ss 00:00:00 -t 00:00:30 -i input.mp4 -acodec copy -vcodec copy output.mp4
avconv -ss 00:00:00 -t 00:00:30 -i input.mp4 -acodec copy -vcodec copy output.mp4
@wrzlbrmft
wrzlbrmft / pseudo-random.js
Created November 14, 2015 14:28
Re: Random numbers: Ads may not include code that generates or uses random numbers. (Google)
var PseudoRandom = PseudoRandom || {};
PseudoRandom.seed = 12345 * (12345 + new Date().getMilliseconds());
PseudoRandom.random = function() {
this.seed = parseInt(("" + (12345 * this.seed)).substr(0, 13));
return parseFloat("0." + ("" + this.seed).split("").reverse().join(""));
};
// Example
for (var i = 0; i < 10; i++) {
document.write(PseudoRandom.random() + "<br />");
@wrzlbrmft
wrzlbrmft / google-heart.txt
Created November 14, 2015 14:28
Google Heart
# sqrt(cos(x))cos(60x)+sqrt(abs(x))-0.6*(6-x^2)^0.01
http://www.google.com/search?q=sqrt(cos(x))cos(60x)%2Bsqrt(abs(x))-0.6*(6-x%5E2)%5E0.01
@wrzlbrmft
wrzlbrmft / head-tail.txt
Created November 14, 2015 14:28
Show lines 6-8 of a text file.
# from (8-3)+1 to 8
head -n 8 file.txt | tail -n 3
@wrzlbrmft
wrzlbrmft / tumblr-archive.html
Created November 14, 2015 14:25
Bookmarklet to instantly switch to the archive view of any tumblr blog.
Drag this link into your bookmarks bar:
<a href="javascript:(function(){window.location.href=window.location.protocol+'//'+window.location.hostname+'/archive';})();">Archive</a>