This file contains hidden or 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 go | |
import ( | |
"io/ioutil" | |
"github.com/gonuts/yaml" | |
) | |
var Config = make(map[string]interface{}) | |
func Load(yamlFile string) (err error) { |
This file contains hidden or 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
# coding: utf-8 | |
from __future__ import absolute_import, unicode_literals | |
from collections import defaultdict | |
import commands | |
from multiprocessing import Process | |
from django.conf import settings | |
from django.core.management.base import BaseCommand |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js"></script> | |
<script type="text/javascript"> | |
function tableController($http, $scope) { | |
$scope.records = [ | |
{ | |
id: 1, | |
name: 'John', |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/knockout/3.2.0/knockout-min.js"></script> | |
<script type="text/javascript"> | |
$(function() { | |
function Campaign(data) { | |
var self = this; | |
This file contains hidden or 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
user root; | |
worker_processes 4; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
multi_accept on; | |
} |
This file contains hidden or 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
# coding: utf-8 | |
import re | |
from django.forms.fields import CharField | |
from django.forms.widgets import EmailInput | |
from django.utils.deconstruct import deconstructible | |
class EmailValidator(object): |
This file contains hidden or 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
# coding: utf-8 | |
from __future__ import absolute_import, unicode_literals, print_function | |
import sys | |
class Progress(object): | |
def __init__(self, max_count): | |
self._count = 0 |
This file contains hidden or 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 main | |
import ( | |
"bytes" | |
"encoding/json" | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" |
This file contains hidden or 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
FROM ubuntu:14.10 | |
MAINTAINER Hirokazu Miyaji <[email protected]> | |
RUN locale-gen ja_JP.UTF-8 UTF-8 | |
RUN apt-get -y update &&\ | |
apt-get -y install clang-3.5 llvm-3.5 &&\ | |
ln -snf /usr/bin/gcc /usr/bin/clang-3.5 &&\ | |
ln -snf /usr/bin/g++ /usr/bin/clang++-3.5 &&\ | |
apt-get -y install linux-headers-$(uname -r) build-essential git zlib1g-dev libssl-dev libpcre3-dev wget &&\ | |
git clone -b master https://github.com/jemalloc/jemalloc.git /usr/local/src/jemalloc &&\ |
This file contains hidden or 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 colorprint | |
import fmt | |
func Red(format string, a ...interface{}) { | |
fmt.Println("\x1b[31;1m%s\x1b[0m\n", fmt.Sprintf(format, a...)) | |
} | |
func Green(format string, a ...interface{}) { | |
fmt.Println("\x1b[32;1m%s\x1b[0m\n", fmt.Sprintf(format, a...)) |