Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@hpirosha
hpirosha / JavaDSLMain
Created December 4, 2012 11:53
demoOne_camel_java_dsl
package org.nsinfra.camel;
import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
public class JavaDSLMain extends RouteBuilder {
/**
* {@link RouteBuilder#configure()}
@pellekrogholt
pellekrogholt / collision.coffee
Last active December 24, 2015 07:09
could find the gist for http://mbostock.github.io/d3/talk/20111018/collision.html so here is a replication
# w = 1280, h = 800
collide = (node) ->
r = node.radius + 16
nx1 = node.x - r
nx2 = node.x + r
ny1 = node.y - r
ny2 = node.y + r
(quad, x1, y1, x2, y2) ->
if quad.point and (quad.point isnt node)
x = node.x - quad.point.x
@lzhoucs
lzhoucs / 00.jersey helloword1
Last active January 14, 2017 08:25
jax-rs with jersey 2.3 + tomcat 7
title file.
@shagunsodhani
shagunsodhani / Teaching Machines to Read and Comprehend.md
Created August 14, 2016 12:48
Notes for Teaching Machines to Read and Comprehend paper

Teaching Machines to Read and Comprehend

Introduction

  • Build a supervised reading comprehension data set using news corpus.
  • Compare the performance of neural models and state-of-the-art natural language processing model on reading comprehension task.
  • Link to the paper

Reading Comprehension

@alChaCC
alChaCC / brew-java-and-jenv.md
Last active July 23, 2020 09:17 — forked from tomysmile/brew-java-and-jenv.md
How To Install Java 8 on Mac

Install HomeBrew first

brew update
brew tap caskroom/cask
brew install brew-cask

If you get the error "already installed", follow the instructions to unlink it, then install again:

@marcanuy
marcanuy / gunicorn-SITENAME-staging.example.com.service
Created August 7, 2015 22:55
Using Systemd to Make Sure Gunicorn Starts on Boot. As Ubuntu has switched to systemd as its service framework starting in 15.04 for all flavors, this is a migration of the Gunicorn upstart job that appears in "Test Driven Development with Django" (http://chimera.labs.oreilly.com/books/1234000000754/ch08.html#_using_upstart_to_make_sure_gunicorn…
# Gunicorn Site systemd service file
[Unit]
Description=Gunicorn server for SITENAME-staging.example.com
After=network.target
After=syslog.target
Environment=sitedir=/Development/sites/SITENAME-staging.example.com
ExecStart=$(sitedir)/virtualenv/bin/gunicorn --chdir $(sitedir)/source workouts.wsgi:application --bind unix:/tmp/SITENAME-staging.example.com.socket
Restart=on-failure
@spences10
spences10 / installJavaAndIntelliJ.sh
Last active August 20, 2022 19:21
Shell script to Install Java and IntelliJ for Ubuntu
#!/bin/sh
# Sources:
# http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
# http://askubuntu.com/questions/272314/setup-and-install-intellij-with-jdk
# https://gist.github.com/tahl/1658401
# guide on setting up IntelliJ from Tony Owen
# http://droidapp.co.uk/2012/12/29/switching-to-intellij-installation-and-setup/
# I have amended for my own purposes please refer to considerations in the Ask Ubuntu post
@visenger
visenger / install_scala_sbt.sh
Last active January 31, 2023 19:10
Scala and sbt installation on ubuntu 12.04
#!/bin/sh
# one way (older scala version will be installed)
# sudo apt-get install scala
#2nd way
sudo apt-get remove scala-library scala
wget http://www.scala-lang.org/files/archive/scala-2.11.4.deb
sudo dpkg -i scala-2.11.4.deb
sudo apt-get update
@phortx
phortx / gist:4059848
Created November 12, 2012 15:02
Java Unicode German Umlaut Escape Sequences
Char Unicode
------------------------------
Ä, ä \u00c4, \u00e4
Ö, ö \u00d6, \u00f6
Ü, ü \u00dc, \u00fc
ß \u00df
@derhuerst
derhuerst / intro.md
Last active May 13, 2023 17:56
Installing the Z Shell (zsh) on Linux, Mac OS X and Windows

Installing zsh – the easy way

The Z shell (zsh) is a Unix shell [...]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.

Z shell – Wikipedia

Read more about ZSH at An Introduction to the Z Shell.

Choose one of the following options.