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
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import time | |
IP = 0 # Instruction pointer | |
DP = 0 # Data pointer | |
DATA = [0] * 20 | |
OUTPUT = [] |
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
var http = require("http"); | |
var server = http.createServer(function (req, res) { | |
// needs to be a big enough file for the download not to finish inmediately | |
var url = "http://lolpics.se/pics/1871.jpg"; | |
res.writeHead(200, {"Content-Type": "application/octet- stream", | |
"Content-Disposition": "attachment; filename='big.jpg'"}); | |
var file_request = http.request(url, function(file_response) { | |
file_response.pipe(res); | |
file_response.on("data", function(data) { |
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))))) |
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
# -*- 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
#!/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
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
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
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
#/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') |
NewerOlder