Skip to content

Instantly share code, notes, and snippets.

View Otann's full-sized avatar
centring an emoji inside a circle is indeed difficult

Anton Chebotaev Otann

centring an emoji inside a circle is indeed difficult
View GitHub Profile
@Otann
Otann / gist:2600194
Created May 5, 2012 05:53
Lift to JavaScript mapping
trait JsHandlerSnippet {
val defaultFuncName = nextFuncName
// This will be called on server-side
def handleJs(param: String): JsCmd
def script(x: NodeSeq): NodeSeq = {
val funcName = S.attr("name") openOr defaultFuncName;
Script(ensure & OnLoad(SetExp(JsVar("window.lift", funcName), jsFunc)))
@Otann
Otann / name
Created July 19, 2012 08:04
Test gist
### Header
* list
* list
* list
*Some* text
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
DEFAULT_USER="anton"
# First verify the version of Java being used is not SunJSK.
java -version
# Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html
wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpm
# Rename the file downloaded, just to be nice
mv jdk-7u1-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u1-linux-i586.rpm
# Install Java

Ubuntu Upstart Script for Team City

  1. Install TeamCity.conf and TeamCityAgent.conf in /etc/init/

  2. Create TeamCity in /etc/default/TeamCity

  3. Make sure TEAMCITY_DATA_PATH and TEAMCITY_SERVER_PATH are owned by www-data

  4. Start TeamCity

     sudo service TeamCity start
    
var path = require('path'),
gulp = require("gulp"),
gutil = require("gulp-util"),
gfilter = require('gulp-filter'),
mocha = require('gulp-mocha'),
awspublish = require('gulp-awspublish');
var webpack = require("webpack"),
webpackGB = require('gulp-webpack-build'),
WebpackDevServer = require("webpack-dev-server");
package jp.t2v.lab.play2.auth
import scala.reflect.ClassTag
/** Enables authentication for separate entities */
class CustomCacheIdContainer[Id: ClassTag](suffix: String) extends CacheIdContainer[Id] {
override private[auth] val tokenSuffix = s":$suffix:token"
override private[auth] val userIdSuffix = s":$suffix:userId"
(def clojure-ver "1.6.0")
(def pallet-ver "0.8.0-RC.8")
(def jclouds-ver "1.7.3")
(defproject scoopmonkey "0.1.0-SNAPSHOT"
:description "Service wrapper for ScoopMonkey"
:url "https://github.com/truckerpathteam/scoopmonkey"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
(ns webapp.core
(:use [compojure.core :only (defroutes GET)]
[ring.adapter.jetty :as ring]))
(defroutes routes
(GET "/" [] "<h2>Hello World</h2>"))
(defn -main []
(run-jetty routes {:port 3000 :join? false}))
(ns saferwatch.handler
(:gen-class)
(:require [clojure.zip :as zip]
[clojure.data.xml :as data-xml]
[clojure.data.zip.xml :refer [xml1-> text]]
[environ.core :refer [env]]
[compojure.core :refer [defroutes GET]]
[compojure.route :as route]
[compojure.handler :as handler]
[ring.middleware.json :refer [wrap-json-response]]