This file contains 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
memoized_fib :: Int -> Integer | |
memoized_fib = (map fib [0 ..] !!) | |
where fib 0 = 1 | |
fib 1 = 1 | |
fib n = memoized_fib (n-2) + memoized_fib (n-1) | |
{- | |
4202692702995154386319005101293915131773915702632234503304716087198335731457276226633938477267013660 | |
9625336617028583291866411622988222153337335741472686145222051779603602165762920967955306565025379983 | |
1449502633050062071908889898464361959992647623610831850502374986470385949102468662124173068273611572 |
This file contains 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
import org.junit.Test; | |
import static org.junit.Assert.assertEquals; | |
/** | |
* Created by kenny on 7/30/14. | |
*/ | |
public class FibonacciTest { | |
private int[] mem = new int[50]; |
This file contains 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
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# *) local and remote branch names | |
# *) local and remote tag names |
This file contains 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
<configuration> | |
<appender name="startupRolloverAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<file>${logging-path}/${entry-point}.log</file> | |
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> | |
<fileNamePattern>${logging-path}/${entry-point}-%i.log.gz</fileNamePattern> | |
<minIndex>1</minIndex> | |
<maxIndex>10</maxIndex> | |
</rollingPolicy> | |
<triggeringPolicy class="com.datarank.krunch.utils.StartupTriggeringPolicy"/> | |
<encoder> |
This file contains 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
public | |
class | |
Omg | |
{ | |
public | |
static | |
void | |
main | |
( | |
String |
This file contains 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
public String get(String key, Object... o){ | |
if(o == null){ | |
return texts.getString(key); | |
} else { | |
String str = texts.getString(key); | |
for(int i = 0; i < o.length; i++) { | |
str = str.replace("{" + i + "}", o[i].toString()); | |
} | |
return str; | |
} |
This file contains 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
#!/bin/sh | |
git filter-branch -f --env-filter ' | |
an="$GIT_AUTHOR_NAME" | |
am="$GIT_AUTHOR_EMAIL" | |
cn="$GIT_COMMITTER_NAME" | |
cm="$GIT_COMMITTER_EMAIL" | |
if [ "$GIT_COMMITTER_EMAIL" = "jon.doe@gmail.com" ] | |
then |
This file contains 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
#!/bin/sh | |
git filter-branch -f --msg-filter 'sed "s/<old message>/<new message>/g"' -- --all |
This file contains 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
#!/bin/sh | |
#TARFILE="jdk-7u17-linux-x64.tar.gz" | |
TARFILE="jdk-7u17-linux-i586.tar.gz" | |
# wget http://www.ken-soft.com/dl/jdk/$TARFILE | |
tar -xvf $TARFILE | |
if [ ! -d "/usr/lib/jvm/jdk1.7.0/" ]; then | |
sudo mkdir /usr/lib/jvm/jdk1.7.0/ | |
fi |
This file contains 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
{ | |
html : { | |
head : { | |
title : 'Btiques', | |
style : { link : 'blah.css' }, | |
script : { link : 'blah.js' }, | |
meta : { name : 'foo', content : 'bar' } | |
}, | |
body : { | |
.hand-cursor : { |
OlderNewer