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
function fibonacci(n) { | |
return Array.apply(0, new Array(n)).reduce(function(seq, current, index) { | |
return seq.concat((index < 2) ? index : seq[index-1] + seq[index-2]); | |
}, []); | |
} |
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
((~~(Math.random()*10))%2 ? "Yes" :"No don't") + " do it!" |
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 interface DBConnection { | |
/** | |
* Commits a student to this connection. | |
* | |
* @param student the student to be committed. | |
* @return <code>0</code> if committed successfully, <code>-1</code> otherwise. | |
*/ | |
int commitStudent(Student student); | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Session example test</title> | |
</head> | |
<body> | |
<h1>Session exmaple test</h1> | |
<form action="session-example.php" method="post"> | |
<label for="fullname">Full Name: </label><input type="text" name="fullname"> |
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 tab-completion for homebrew (https://github.com/mxcl/homebrew) | |
############### | |
# Installation: | |
# mkdir ~/.bash_completion.d | |
# curl https://gist.github.com/raw/774554/brew_completer.sh > ~/.bash_completion.d/brew_completer.sh | |
# echo 'source ~/.bash_completion.d/brew_completer.sh' >> ~/.bashrc | |
# source ~/.bashrc |
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
<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'> | |
<title>Mail Filters</title> | |
<id>tag:mail.google.com,2008:filters:1449480248801,1454509691508,1454509733157,1454509751764,1454608046142,1454665081786,1454665089704,1454665095511</id> | |
<updated>2016-02-08T15:30:39Z</updated> | |
<author> | |
<name>Luke Camilleri</name> | |
<email>[email protected]</email> | |
</author> | |
<entry> | |
<category term='filter'></category> |
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 | |
# Add this in your .git/hooks folder | |
firstLine=$(head -n1 $1) | |
if [ -z "$firstLine" ] ;then | |
BRANCH_NAME=`git rev-parse --abbrev-ref HEAD` | |
APPEND_TO_COMMIT_MSG="# Branch does not contain an issue id, feel free to add your own.\n\n# Casumo/Home#" | |
if [[ $BRANCH_NAME == iss* ]]; then | |
APPEND_TO_COMMIT_MSG="`echo $BRANCH_NAME | sed -e 's/iss\([0-9]*\)\(.*\)/# Casumo\/Home#\1/g'`" |
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
[core] | |
excludesfile = /Users/CHANGE_HERE/.gitignore_global | |
pager = diff-so-fancy | less -r | |
editor = code -w | |
[user] | |
name = YOUR_NAME | |
useConfigOnly = true | |
[alias] | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
ignore-file = !git update-index --assume-unchanged |
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
:fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot: | |
:party-parrot-conga: :party-parrot-conga-reverse: | |
:party-parrot-conga: *PARTY PARROT Crew* :party-parrot-conga-reverse: | |
:party-parrot-conga: :party-parrot-conga-reverse: | |
:party-parrot-conga: :party-parrot: :party-parrot-conga-reverse: | |
:party-parrot-conga: :party-parrot-conga-reverse: | |
:party-parrot-conga: :party-parrot-conga-reverse: | |
:fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot: |
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
// @flow | |
import type {KnockoutComputed, KnockoutObservable} from 'knockout'; | |
import ko from 'knockout'; | |
interface FooJSON { | |
name: string; | |
surname: string; | |
} | |
interface FooModel { |
OlderNewer