Skip to content

Instantly share code, notes, and snippets.

View mnn's full-sized avatar

monnef mnn

View GitHub Profile
http://www.engadget.com/
http://www.theverge.com/
http://www.zdnet.com/
http://www.neowin.net/
http://www.anandtech.com/
http://arstechnica.com/
http://theverge.com/
http://www.osnews.com/
http://www.cnews.cz
http://cdr.cz
@mnn
mnn / avisynth - fullscreen
Last active August 29, 2015 13:57
adds bars to bottom and top so the resulting stream covers whole screen (de_w and de_h parameters)
de_w=1920.0
de_h=1080.0
a=de_w/de_h
my_w=Width()
my_h=Height()
p_w=0
p_h=(-my_h+(my_w/a))/2
AddBorders(round(p_w), round(p_h), round(p_w), round(p_h),$000000)
#Subtitle(string(p_h)+"x")
@mnn
mnn / popupAdBlocker.js
Last active August 29, 2015 13:57
Pop-up Ad Blocker for ads placed in state of "being almost inactive" on 000webhost.com (ads by Hosting24.com)
/*
Pop-up Ad Blocker for ads placed in state of "being almost inactive" on 000webhost.com (ads by Hosting24.com)
made by monnef
If you use this script you can still tell when you should log-in to prevent freezing your account.
(If you use blocking in .htaccess you cannot really tell, when it's active.)
The responsible script -> http://stats.hosting24.com/count.php
*/
function markAdBlocked(str){
import scala.runtime.ScalaRunTime.stringOf
import scala.collection.JavaConverters._
// stuff for verifying results, skip to case defs (comment -- 1 --)
def doVerify[A](name: String, origRes: A, myRes: A) {
val equals = origRes match {
case a: Array[_] => a.sameElements(myRes.asInstanceOf[Array[_]])
case _ => origRes.equals(myRes)
}
if (equals) println(s"Case '$name' fine: ${stringOf(myRes)}")
@mnn
mnn / gist:5844da17db537d05443a
Created February 3, 2015 22:13
IO benchmark with `dd`
dd conv=fdatasync if=/dev/zero of=/tmp/output.img bs=8k count=128k; rm /tmp/output.img
@mnn
mnn / prepare_wallpaper.sh
Created October 1, 2013 15:32
Converts wallpaper picture to 1920x1080 dual monitor setup - left monitor filled with gray, right with input image. Uses ImageMagick.
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "$0 <input_file> <output_file>"
exit 1
fi
convert "$1" -resize 1920x1080 -background "#222222" -gravity east -extent 3840x1080 "$2"
current="$(readlink -f $(dirname "$0"))"
Α α Alpha a al-fa
Β β Beta b be-ta
Γ γ Gamma g ga-ma
Δ δ Delta d del-ta
Ε ε Epsilon e ep-si-lon
Ζ ζ Zeta z ze-ta
Η η Eta h eh-ta
Θ θ Theta th te-ta
Ι ι Iota i io-ta
Κ κ Kappa k ka-pa
java -Dsbt.main.class=sbt.ScriptMain -Dsbt.boot.directory=c:/users/<user>/.sbt/boot -jar c:/users/<user>/.conscript/sbt-launch.jar %*
addStyle = (css) !-> $ '<style type="text/css"></style>' .html(css) .appendTo(\head)