Skip to content

Instantly share code, notes, and snippets.

View fliiiix's full-sized avatar
🎩
This is the year of ipv6 and python3!

Felix fliiiix

🎩
This is the year of ipv6 and python3!
View GitHub Profile
@fliiiix
fliiiix / fancyfileupload.html
Last active December 19, 2015 17:29
A fancy fileupload with java script (no jquery) and fontawesome & puress http://l33tsource.com/blog/2013/07/21/Fancy-File-Upload.html
<html>
<head>
<title>File Upload</title>
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.2.0/pure-min.css">
<style type="text/css">
.fileContainer {
overflow: hidden;
position: relative;
}
@fliiiix
fliiiix / disableEnter.js
Created September 27, 2013 08:28
Do What The Fuck You Want To Public License Diable the Enter event, even in IE 8. With Jquery 1.4.1. And There is a but if you use `$(window).keydown(function (event) {` the keydown doesn't get executed.
$(document).ready(function () {
$(document).keydown(function (event) {
if (event.keyCode == 13) {
event.preventDefault();
return false;
}
});
});
#!/bin/sh
# Schwanzvergleich powered by http://pinguinblog.de
export LC_ALL=C
echo `uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'; cat /proc/cpuinfo|grep '^cpu MHz'|awk '{print $4"/30 +";}';free|grep '^Mem'|awk '{print $3"/1024/3+"}'; df -P -k -x nfs -x smbfs | grep -v '(1k|1024)-blocks' | awk '{if ($1 ~ "/dev/(cciss|scsi|sd)"){ s+= $2} s+= $2;} END {print s/1024/50"/15+70";}'`|bc|sed 's/\(.$\)/.\1cm/'
#!/bin/sh
declare -i f=75 s=13 r=2000 t=0 c=1 n=0 l=0
declare -ir w=$(tput cols) h=$(tput lines)
declare -i x=$((w/2)) y=$((h/2))
declare -ar v=( [00]="\x83" [01]="\x8f" [03]="\x93"
[10]="\x9b" [11]="\x81" [12]="\x93"
[21]="\x97" [22]="\x83" [23]="\x9b"
[30]="\x97" [32]="\x8f" [33]="\x81" )
#!/bin/bash
sshfs remoteserver:backup/secure /root/backup/sshfsMount -o ServerAliveInterval=15 -o uid=10025 -o gid=10003
encfs -i n -o allow_other /root/backup/sshfsMount /root/backup/encripted/
rdiff-backup --no-hard-links --terminal-verbosity 5 /mnt/raid/secure /root/backup/encripted
fusermount -u /root/backup/encripted
fusermount -u /root/backup/sshfsMount
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;
using System.IO;
public class PdfHandler: IHttpHandler
{
public bool IsReusable

#The daebbulatius http status code

http status code message daebbulatius message
403 forbidden na danke ey
404 not found na super
500 add later Internal go fuck yourself error
502 bad gateway och nö
503 service unavailable ach mein arsch
@fliiiix
fliiiix / grub
Created December 18, 2013 17:03
case ${BOOT} in
chain)
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
EOF
save_default_entry | grub_add_tab
prepare_grub_to_access_device ${DEVICE} | grub_add_tab
@fliiiix
fliiiix / update.sh
Last active January 1, 2016 12:39
Build Hermelin `curl https://gist.github.com/fliiiix/8146460/raw/ | bash`
#/bin/sh
git pull
mkdir -p build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_GTK=ON \
-DWITH_GTK2=OFF \
-DWITH_GTK3=ON \
-DWITH_QT=OFF \
@fliiiix
fliiiix / .bashrc
Last active August 29, 2015 13:56
alias git_pull='echo "update repo" && git pull && echo "update submodule" && git submodule update --init --recursive && echo "kill ruby" && killall -u $user ruby'
alias bundler='bundle install --binstubs --path vendor'
alias gitsubmodulupdate='git submodule update --recursive && git submodule foreach git pull origin master && git commit -am "update submodul" && git push'
function mongologin(){
mongo admin --port $port -u mongoadmin -p $passwort
}