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
package models | |
import java.util.{Date} | |
import play.db.sql._ | |
import play.db.sql.SqlParser._ | |
// User | |
case class User(id: Pk[Long], |
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
import collection.mutable.ListBuffer | |
object NetworkUtils { | |
def ip2Long(ip: String): Long = { | |
val atoms: Array[Long] = ip.split("\\.").map(java.lang.Long.parseLong(_)) | |
val result: Long = (3 to 0 by -1).foldLeft(0L)( | |
(result, position) => result | (atoms(3 - position) << position * 8)) | |
result & 0xFFFFFFFF | |
} |
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
<meta property="og:site_name" content="Boomstarter" /> | |
<meta property="fb:app_id" content="423149071041361"/> | |
<meta property="twitter:site:id" content="boomstarterru"/> | |
<meta property="vk:app_id" content="2998311" /> | |
<meta name="video_height" content="420"/> | |
<meta name="video_width" content="560"/> |
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
{ | |
"name": "streamingtest", | |
"version": "0.0.1", | |
"engines": { | |
"node": ">=0.6.0" | |
}, | |
"dependencies": { | |
"express": "2.5.x", | |
"coffee-script": "1.2.x" | |
}, |
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
CREATE EXTENSION IF NOT EXISTS pgcrypto; | |
CREATE EXTENSION IF NOT EXISTS plv8; | |
DROP FUNCTION IF EXISTS to_base52(digit_number bigint); | |
DROP FUNCTION IF EXISTS to_base52(digit_number text, base integer); | |
CREATE FUNCTION to_base52(digit_number bigint) RETURNS text AS | |
$$ | |
var codeset = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
var base = codeset.length |
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
tr ng-repeat="chunksetsBuf in splitChunksetsArray[for_id]" | |
td.group ng-repeat="(index, col) in chunksetsBuf" |
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
class AwesomeAd < ActiveRecord::Base;end |
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
package ca.underflow.hbase | |
import org.hbase.async._ | |
import com.stumbleupon.async._ | |
object Demo extends App { | |
// This let's us pass inline functions to the deferred | |
// object returned by most asynchbase methods |
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
DROP FUNCTION IF EXISTS hstore_from_agg(hstores hstore[]); | |
CREATE FUNCTION hstore_from_agg(hstores hstore[]) RETURNS hstore AS | |
$$ | |
var result = {} | |
hstores.forEach(function (sHash) { | |
sHash.split(/,\s*/).forEach(function(expression) { | |
var parsedValues = expression.match(/"(\d+)"=>"(\d+)"/), | |
key = parsedValues[1], |