This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fib_cached = function() { | |
cache = new Array; | |
this.exec = function(n) { | |
if(n <= 0) { | |
return 0; | |
} | |
if(cache[n] != undefined) { | |
return this.cache[n]; | |
} | |
if(n > 2) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
This file in action: http://23g.eu/fibonacci/ | |
--> | |
<html> | |
<head> | |
<title>fibonacci | wdeu</title> | |
<script type="text/javascript"><!-- | |
var fib_obj = function () { | |
var cache = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout somewhen, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" juhu - bunte Fraben... | |
syntax on | |
" Zeilenummerierung ist toll | |
set number | |
" Zeilenumbrüche stören | |
set nowrap | |
" rückwärtskompatibilität von vim abschalten |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines or lines starting with space in the history. | |
# See bash(1) for more options | |
HISTCONTROL=ignoreboth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var worker_clb = function(name, clb) { | |
var d = new Date(); | |
for(var i = 0; i < 100000000; i++) { | |
i+i; | |
} | |
clb(name + "_clb returns after " + ((new Date()) - d) + " ms."); | |
} | |
var a_lot_to_do = function(name, clb) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
# please visit the repository of fuzzy-logic: https://github.com/addisaden/fuzzy-logic | |
require "fuzzy-logic" | |
temp = FuzzyLogic::Collection.new("Temperatures in °C") { |value| | |
value.is_a?(Numeric) ? (value <= 100 and value >= -100 ? true : false) : false | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# | |
# good source: http://whatisthor.com/ | |
require "thor" | |
class MyCmd < Thor | |
desc "hello [NAME]", "say hello to NAME" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "highline/import" | |
user = ask("username: ") | |
password = ask("password: ") { |p| | |
p.echo = '*' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hallo(name) { | |
alert('Hallo, ' + name + '!'); | |
} | |
function welt(callback_function) { | |
callback_function('Welt'); | |
} | |
welt(hallo); // => alert("Hallo, Welt!") |