Skip to content

Instantly share code, notes, and snippets.

View syranez's full-sized avatar

Michael Nowack syranez

  • Würzburg, Germany
View GitHub Profile
@syranez
syranez / thinkgeek2012-1.md
Created June 18, 2012 21:03
Let us buy thinkgeek1
> AVGP: Questions for hiring developers - tmblr.co/Z7vh7yNNU_nm
https://twitter.com/AVGP/status/213269846207643649
> syranez: "What programming language is the best one in your opinion?" - bash. All you can do, I can do better in bash.
https://twitter.com/syranez/status/213275248592826368
> the_kenny: @syranez Clojure.
> the_kenny: @syranez And elisp. Clojure and elisp.
https://twitter.com/the_kenny/status/213281436504043520
https://twitter.com/the_kenny/status/213281474164699136
> syranez: @the_kenny My answer was not serious. Y WAS UR? RT @AVGP Questions for hiring developers - tmblr.co/Z7vh7yNNU_nm
https://twitter.com/syranez/status/213292378210054145
@syranez
syranez / housesitting2012_1.md
Created June 8, 2012 21:19
Haussitting 2012 - updated

From 09. Juni 2012 till 14. Juli 2012

Todos:

  1. Water the plants once a week (ore more often if its hots) (Half of bottle should do).
    1. 15th June (and 13th): drowned the plants on 15th June.
    2. on 19th June cos it is hot and plants do want water too.
    3. 22th June (and 20th): feed zem on 22th.
    4. 29th June (and 27th): gave zem water on 27th June and 30th June.
  2. 06th July (and 04th): watered on 4th July and gave zem much more water (making zem swamp plants, cos swamp plants are much more cool) on 6th July.
[1911]s[syranez@elis:~]$ type doesnotexists 2&> /dev/null
[1911]s[syranez@elis:~]$ echo $?
1
[1912]s[syranez@elis:~]$ type type 2&> /dev/null
[1912]s[syranez@elis:~]$ echo $?
1
[1912]s[syranez@elis:~]$ type type
type is a shell builtin
[1912]s[syranez@elis:~]$ echo $?
0
@syranez
syranez / gist:2705465
Created May 15, 2012 21:57
I think this is irony. (found in jshint.) (curly: "This option requires you to always put curly braces around blocks in loops and conditionals. JavaScript allows you to omit curly braces when the block consists of only one statement")
2852 if (!stmt || option.curly)
2853 warning("Expected '{a}' and instead saw '{b}'.",
2854 nexttoken, '{', nexttoken.value);
@syranez
syranez / avoidbooleanparameters.md
Created May 9, 2012 19:29
avoid boolean parameters.

You have:

function foo () { /* do something */ }

and then you find that foo should do something else when condition baz is true. So you do some bullshit like:

`function foo (baz) { if (baz) {

@syranez
syranez / hpj_notices.md
Created May 6, 2012 15:18
Notizen zu "High Performance JavaScript"

Kapitel 1

  1. script-Tags unterbrechen den Aufbau der Seite. Code in script-Tags wird (runtergeladen,) geparst und sofort ausgeführt. Erst danach wird das nachfolgende HTML verarbeitet und dargestellt.
  2. Darum: So viele script-Tags wie möglich ans Ende des body-Tags setzen.
  3. Weil jedes script-Tag geparst und ausgeführt werden muss, sollte die Anzahl der script-Tags minimiert werden.
  4. defer-Attribut signalisiert dem Browser, dass keine DOM-Änderungen vorgenommen werden. Der Code wird erst ausgeführt, wenn der DOM komplett erzeugt wurde. Falls eine Script-URI angegeben ist, wird das Skript parallel runtergeladen.
  5. JavaScript kann dynamisch in die Seite eingefügt werden: script-Node einfügen. Sobald der Node eingefügt ist, wird der Code geparst und ausgeführt. Handler (onload, onreadystatechange) geben Auskunft darüber, wenn das Skript ausgeführt wurde.

Kapitel 2 - Data Access

@syranez
syranez / create-repo.sh
Created May 5, 2012 09:46 — forked from yefim/create-repo.sh
Create a new GitHub repo and check the response.
#! /usr/bin/env bash
user="syranez"
directory="/dev/shm/json"
root_node="git"
read -s -p "GitHub password: " pass
response=$(curl -s -u "${user}:$pass" https://api.github.com/user/repos -d "{\"name\":\"$1\"}")
@syranez
syranez / gist:2502454
Created April 26, 2012 19:41
Plasmos score on develz.org
[2140][syranez@fornax:~/html/crawl/morgues]$ for file in $(ls plasmo/*); do head -n3 $file |tail -n 1 | awk '{print $1}'; done | sort -g
20
20
22
24
29
37
38
40
77
@syranez
syranez / gist:2502450
Created April 26, 2012 19:41
syranez' scores on develz.org
[2140][syranez@fornax:~/html/crawl/morgues]$ for file in $(ls syranez/*); do head -n3 $file |tail -n 1 | awk '{print $1}'; done | sort -g
21
21
33
43
179
189
206
210
246