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
redirects = File.read("redirects.txt").split_lines.map{|r| r.split(",") } | |
redirects.each do |from, to| | |
path = "source/#{from}" | |
File.write(path, to) | |
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
source $HOME/.cargo/env | |
alias t-add='todoist --color add' | |
alias t-list='todoist sync && todoist --color list' | |
alias t-close='todoist --color close' | |
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
" Use this group for any autocmd defined in this file. | |
augroup MyAutoCmd | |
autocmd! | |
augroup END | |
" gocode | |
set rtp+=$GOROOT/misc/vim | |
"golint | |
exe "set rtp+=" . globpath($GOPATH, "src/github.com/golang/lint/misc/vim") |
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 main | |
import ( | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
) | |
func connectReverseProxy(connectUrl string, port int) { |
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 | |
NO=7 | |
GPIO=/sys/class/gpio/gpio$NO | |
setup() { | |
echo start! | |
echo $NO > /sys/class/gpio/export | |
echo in > $GPIO/direction |
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
sudo apt-get install cpanminus build-essential rrdtool libpango1.0-dev libxml2-dev | |
sudo cpanm -n GrowthForecast | |
growthforecast.pl --data-dir /home/user/growthforecast |
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/sh | |
LCD=0x3e | |
LANG= | |
IP=`/sbin/ifconfig eth0 | grep "inet addr:" | cut -f2 -d : | cut -f1 -d " "` | |
echo "IP: $IP" | |
ip_char_at(){ |
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/sh | |
# -*- sh -*- | |
: << =cut | |
=head1 NAME | |
ssh_invalid - Plugin to measure invalid ssh user. | |
=head1 AUTHOR |
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
#!/usr/bin/python | |
# Import PySide classes | |
import sys | |
from PySide.QtCore import * | |
from PySide.QtGui import * | |
class App: | |
def __init__(self): |
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 requests | |
from PySide import QtGui, QtCore | |
import sys | |
class AddressEdit(QtGui.QLineEdit): | |
def __init__(self, parent): | |
QtGui.QLineEdit.__init__(self, parent) |