Skip to content

Instantly share code, notes, and snippets.

View H4kor's full-sized avatar
🦉
Thinking about blogging

Niko Abeler H4kor

🦉
Thinking about blogging
View GitHub Profile
@H4kor
H4kor / .zshrc
Created January 12, 2022 13:02
Alias for Django
alias vv=". venv/bin/activate"
alias djs="python manage.py shell"
alias djr="python manage.py runserver"
alias djmm="python manage.py makemigrations"
alias djmi="python manage.py migrate"

Keybase proof

I hereby claim:

  • I am h4kor on github.
  • I am h4kor (https://keybase.io/h4kor) on keybase.
  • I have a public key ASDvxspNhY0VZmhwrmAPHfqtgba5sS-DGLcqbbdsOxySMgo

To claim this, I am signing this object:

@H4kor
H4kor / filter_list.txt
Last active February 23, 2016 15:38
Things to Block
##div#WMDE_Banner
!Facebook
##div.pop_dialog
##div._5ctm
##div.fbPageBanner
www.neues-deutschland.de###AppAdWrapper > .Wrapper > .Container > .Main > main > .Paywall
www.taz.de###tzi_paywall > .channel-.report.news.sect_article.sect.odd > .sectbody
@H4kor
H4kor / rename.sh
Created August 11, 2015 10:19
Renames all PNGs in the folder to consecutive numbers.
a=1
for i in *.png; do
new=$(printf "%04d.png" "$a") #04 pad to length of 4
mv -- "$i" "$new"
let a=a+1
done
@H4kor
H4kor / color_extract.py
Created March 23, 2015 22:37
A script to create a gradient list out of an image.
#
# author: Niko Abeler (H4kor)
# website: libove.org
# licence: beer-licence
#
import sys
import Image
if len(sys.argv) != 2:
@H4kor
H4kor / .vimrc
Created March 26, 2011 20:43
My .vimrc
:set autoindent
:set cindent
:set number
set nocp
filetype plugin on
set tags+=~/.vim/tags/cpp
set tags+=~/.vim/tags/sfml
@H4kor
H4kor / Trainer2.java
Created November 7, 2010 14:39
Trainer2.java
public class Trainer2{
public static void main(String[] params) {
char auswahl = ' ';
int anzahl = 0;
int richtig = 0;
System.out.println("Bitte wähle eine Rechenoperation die du üben willst:");
System.out.println("1. +");
@H4kor
H4kor / Herz.java
Created November 3, 2010 20:19
Herz.java
public class Herz{
public static boolean inRaute(double px, double py, double cx, double cy, double b) {
double x_abstand = Math.abs(cx - px);
double y_abstand = Math.abs(cy - py);
if((x_abstand + y_abstand) <= b)
return(true);
else
return(false);
}
@H4kor
H4kor / Trainer.java
Created October 28, 2010 06:58
Progra Übung2
public class Trainer {
public static void main(String[] params) {
int zahl1 = IO.randomNumber(0,100); //
int zahl2 = IO.randomNumber(0,100); //Zwei zufällige Zahlen erzeugen
System.out.println("Lösen sie diese Addition: "+ zahl1 + " + " + zahl2 +"\n" ); //Aufgabe ausgeben
long startTime = System.currentTimeMillis(); //Startzeit ausgeben
int eingabe = IO.readInt(); //Eingabe in Variable speichern
long endTime = System.currentTimeMillis(); //Zeit nach der Eingabe speichern
String ausgabe1 = (zahl1 + zahl2) == eingabe ? "richtig " : "falsch "; //Ergebnis überprüfen
@H4kor
H4kor / Programm.java
Created October 28, 2010 06:58
Progra Übung1
public class Programm{
public static void main(String[] params){ //int N Parameter entfernt, [] zu Strings hinzugefügt
int n;
System.out.println("Dieses Programm berechnet die Anzahl des Klingelns beim Sektempfang"); // Ausdruck in eine Zeile geschrieben
System.out.println("D.h. dieses Programm berechnet n*(n-1)/2, gegeben n");
System.out.print("Geben Sie die Zahl der Besucher ein: ");
//Wartet auf Eingabe einer Zahl druch den Benutzer und speichert sie in n
n = IO.readInt(); //N zu n geamcht