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
[Unit] | |
Description=uWSGI in Emperor mode | |
After=syslog.target | |
[Service] | |
ExecStart = /usr/bin/uwsgi --ini /etc/uwsgi/emperor.ini | |
KillSignal=SIGINT | |
ExecReload=/bin/kill -HUP $MAINPID | |
Restart = always | |
Type = notify |
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
rotate :: [Char] -> [Char] -> Int -> Bool | |
rotate _ _ 0 = False | |
rotate s1 s2 len = if s1' == s2 then True else rotate s1' s2 (len-1) | |
where s1' = tail s1 ++ [head s1] | |
cyclep :: [Char] -> [Char] -> Bool | |
cyclep str1 str2 = rotate str1 str2 (length str1) |
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
#/etc/network.d/eth0 | |
CONNECTION='ethernet' | |
DESCRIPTION='VPS eth0 connection' | |
INTERFACE='eth0' | |
IP='static' | |
ADDR='X.X.X.X' | |
GATEWAY='X.X.X.X' | |
DNS=('8.8.8.8' '8.8.4.4') |
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
alias ga='git add' | |
alias gp='git push' | |
alias gl='git log --graph --all --pretty="format:%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset"' | |
alias gs='git status' | |
alias gd='git diff --color-words' | |
alias gdc='git diff --cached' | |
alias gm='git commit -m' | |
alias gma='git commit -am' | |
alias gb='git branch' | |
alias gc='git checkout' |
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 memories | |
import ( | |
"fmt" | |
"errors" | |
) | |
type SRAM struct { | |
size int | |
memory []uint8 |
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 memories | |
import ( | |
"math/rand" | |
"time" | |
"testing" | |
) | |
func TestSRAM(t *testing.T) { | |
rand.Seed(time.Now().UnixNano()) |
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
#!/bin/bash | |
# Version info from elasticsearch:9200 | |
#{ | |
# "ok" : true, | |
# "status" : 200, | |
# "name" : "Tiger Shark", | |
# "version" : { | |
# "number" : "0.90.2", | |
# "snapshot_build" : false, |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
require 'pathname' | |
VAGRANTFILE_API_VERSION = "2" | |
MEMSIZE = "1024" | |
NUMCPUS = "2" | |
CURRENT_DIR = Pathname.new(File.expand_path(File.dirname(__FILE__))) |
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 := main | |
HEX := $(NAME).hex | |
OUT := $(NAME).out | |
MAP := $(NAME).map | |
SOURCES := $(wildcard *.c) | |
HEADERS := $(wildcard *.h) | |
OBJECTS := $(patsubst %.c,%.o,$(SOURCES)) | |
MCU := atmega2560 | |
MCU_AVRDUDE := m2560 |
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
(defun persp-cycle () | |
"Cycle throught the available perspectives." | |
(interactive) | |
(let ((next-pos (1+ (persp-curr-position))) | |
(list-size (length (persp-all-names)))) | |
(cond ((eq 1 list-size) (persp-switch nil)) | |
((>= next-pos list-size) (persp-switch (nth 0 (persp-all-names)))) | |
(t (persp-next))))) |
OlderNewer