Skip to content

Instantly share code, notes, and snippets.

@creationmachine
creationmachine / neo4j_cypher_cheatsheet.md
Created March 12, 2018 01:39 — forked from DaniSancas/neo4j_cypher_cheatsheet.md
Neo4j's Cypher queries cheatsheet

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
@creationmachine
creationmachine / README.md
Created February 23, 2018 19:19 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@creationmachine
creationmachine / deploy.rb
Created August 29, 2016 02:21 — forked from jtadeulopes/deploy.rb
Capistrano deploy.rb
set :repository, "git@bitbucket.org:repo/repo.git"
set :user, "deploy"
set :use_sudo, false
set :scm, :git
set :keep_releases, 5
set :domain, "000.000.000.000"
set :application, "my_app"
set :rails_env, "production"
set :branch, "master"
set :deploy_to, "/var/www/#{application}"
@creationmachine
creationmachine / server.md
Created August 29, 2016 02:20 — forked from jtadeulopes/server.md
Server setup with ubuntu, nginx and puma for rails app.

Update and upgrade the system

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo reboot

Configure timezone

@creationmachine
creationmachine / usevm.md
Created May 11, 2016 21:42 — forked from fideloper/usevm.md
You should develop in a Virtual Machine

#You should do all your LAMP development in a Virtual Machine

##Here's Why:

Many of us develop on Macintoshes. There are many reasons for this, but one of them is that it's based on a Unix platform of some sort. This allows us to run common server software such as Apache, Ruby, Python and Nodejs on our Macs.

Our computers become powerful develoment machines similar to the servers our apps will eventually live on.

Sometime we start our computer only to find Apache won't start, or MySQL can't create a PID file, or we've updated to Mountain Lion and Apache needs to be reconfigured. Death!

@creationmachine
creationmachine / H2EmbeddedTest.java
Created September 25, 2015 17:59 — forked from omnisis/H2EmbeddedTest.java
Configuring H2 database for unit tests w/ spring
package examples.database;
import com.google.common.collect.Lists;
import examples.database.dao.PeopleDAO;
import examples.database.model.PeopleInfo;
import org.apache.commons.lang.time.StopWatch;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Test;
import org.junit.runner.RunWith;
apply plugin: 'java'
apply plugin: 'scala'
// For those using Eclipse or IntelliJ IDEA
apply plugin: 'eclipse'
apply plugin: 'idea'
def findPlay20(){
def pathEnvName = ['PATH', 'Path'].find{ System.getenv()[it] != null }
for(path in System.getenv()[pathEnvName].split(File.pathSeparator)){
for(playExec in ['play.bat', 'play.sh', 'play']){
/*
* How to implement a session timeout in Play Framework 2
* http://www.poornerd.com/2014/04/01/how-to-implement-a-session-timeout-in-play-framework-2/
*
*/
public class Secured extends Security.Authenticator {
public static final String UNAUTHENTICATED = "unauthenticated";
public static User getLoggedInUser() {
#################################################################
#
# File: lib/api.rb
#
#################################################################
require 'user' # ActiveRecord model
# Connect to the db
ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'])
cd ~/Library/Application\ Support
mkdir -p Avian/"Pristine Copy"/Bundles
cd Avian/Pristine\ Copy/Bundles
#clone groovy bundle
git clone https://github.com/textmate/groovy.tmbundle.git
#clone grails bundle
git clone https://github.com/textmate/groovy-grails.tmbundle.git