Skip to content

Instantly share code, notes, and snippets.

@bakanis
bakanis / supervisord
Created October 9, 2015 17:50 — forked from mamemomonga/supervisord
/etc/rc.d/init.d/supervisord for CentOS 6
#!/bin/bash
#
# Startup script for the Supervisor server
#
# Tested with CentOS release 6.6
#
# chkconfig: 2345 85 15
# description: Supervisor is a client/server system that allows its users to \
# monitor and control a number of processes on UNIX-like \
# operating systems.
@bakanis
bakanis / InsertNullString.go
Last active August 29, 2015 14:19
Nullable strings sqlite golang
package main
import (
"database/sql"
"github.com/astaxie/beego"
"github.com/astaxie/beego/orm"
_ "github.com/mattn/go-sqlite3"
)
type User struct {
@bakanis
bakanis / gist:64abba613b2b6282e520
Created December 23, 2014 18:57
beego insert test
package main
import (
"github.com/astaxie/beego"
"github.com/astaxie/beego/orm"
_ "github.com/mattn/go-sqlite3"
)
type User struct {
Id int `orm:"column(id);auto"`
@bakanis
bakanis / gist:0222191fceb75710422d
Created December 2, 2014 09:19
AngularJs training #1
<!DOCTYPE html>
<html>
<head>
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.2.27/angular.min.js"></script>
</head>
<body>
<p>Try to change the names.</p>
@bakanis
bakanis / object.scala
Last active December 18, 2015 04:58
a variable which belongs to a class should be put in the companion object.
class Fruit(name: String, age: Int){
def getColor() = Fruit.color
def setColor(newColor: String) = {
Fruit.color = newColor
}
}
object Fruit{
var color = "yellow"
# Downloading Oracle JVM without browser
Oracle requires you to accept its licence agreement before downloading its JVM.
It's a pain for those of us who do automation, native packages, Jenkins JVM deployment on slave...
I used Firefox and Firebug to sniff network exchanges.
## HTTP Request :
GET /otn-pub/java/jdk/6u39-b04/jdk-6u39-linux-i586.bin?AuthParam=1359814101_9685f919f8b3113a89574ec4570d47b2 HTTP/1.1
@bakanis
bakanis / MixedTweets.md
Created December 2, 2012 22:01 — forked from loicdescotte/MixedTweets.md
How to push 2 mixed searches from twitter with Scala, Play2, Iteratee and Comet

##MixedTweets

We will see how to mix 2 twitter searches and push the results to the browser in real time.

First, checkout this mini project

To try it, you need to install Play 2.0

###Controller