Skip to content

Instantly share code, notes, and snippets.

Get started with [Mocha] testing

Make a package.json file if you don't have one yet:

npm init
# just keep pressing enter.
# this will create the file `package.json`
@jexp
jexp / acl.adoc
Last active May 30, 2019 04:56
Neo4j directed path through multiple relationships with property filter

Neo4j directed path through multiple relationships with property filter

Being new to Cypher and Neo4j, I am having trouble constructing my query for my use-case. I am building a simple ACL (access control list) and am looking for a path through permission relationships an up a hierarchy as well. A picture may better explain it:

cC8KN

Key:
@rafarocha
rafarocha / SampleTest.java
Last active December 20, 2015 03:29
Exemplo de teste utilizando hamcrest e guava para obter apenas os números pares
@Test public void testFilterWithPredicatePairNumbers() {
final List<Integer> numbers = getNumbers();
final List<Integer> onlyPair = filter(numbers, new Predicate<Integer>() {
public boolean apply(Integer input) {
return input % 2 == 0;
}
});
assertThat("deveriam vir apenas os numeros pares entre [0-10]",
onlyPair, are(2, 4, 6, 8, 10) );
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@fguillen
fguillen / git_tips.md
Created December 19, 2010 20:53
Git Tips

(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )

Git tips

Global git user

git config --global user.name "Fernando Guillen"
git config --global user.email "fguillen.mail+spam@gmail.com"

Repository git user

cd /develop/myrepo

# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.