Skip to content

Instantly share code, notes, and snippets.

@zolrath
zolrath / gist:2305333
Created April 4, 2012 20:27
tmux status line from wemux example.

For a tmux status line as seen in the example image for the wemux project: wemux

The session on the left in the example screen shot uses a patched font from the vim-powerline project. Inconsolata-dz, you beautiful creature.

To duplicate the left status line add the following lines to your ~/tmux.conf

set -g status-left-length 32
set -g status-right-length 150
@border
border / mgoExample.go
Created August 27, 2012 15:33
mgo example
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
@pinzolo
pinzolo / gist:3663046
Created September 7, 2012 04:09
[WPF]ウィンドウをデスクトップの任意の位置に表示させる
// System.Windows.Forms と System.Drawing を参照設定に追加する必要がある。
// この例では通知ウィンドウを右下に表示させるというシナリオ
/// <summary>
/// 通知ウィンドウ表示時の画面からのマージン
/// </summary>
private const int NOTIFICATION_WINDOW_DISPLAY_MARGIN = 5;
/// <summary>
/// 指定のメッセージをユーザーに知らせるダイアログを表示する。
@mollifier
mollifier / file0.sh
Created December 11, 2012 00:08
zsh の vcs\_info に独自の処理を追加して stash 数とか push していない件数とか何でも表示する ref: http://qiita.com/items/8d5a627d773758dd8078
# vcs_info 設定
RPROMPT=""
autoload -Uz vcs_info
autoload -Uz add-zsh-hook
autoload -Uz is-at-least
autoload -Uz colors
# 以下の3つのメッセージをエクスポートする
#!/bin/bash
## Install Gitlab 5.2 on OpenSUSE 12.3 32Bits
## Project http://gitlab.org/
## Base https://github.com/gitlabhq/gitlabhq/blob/5-0-stable/doc/install/installation.md
## Autor: Nilton OS -- Version 0.9 14-06-2013 -- http://wwww.linuxpro.com.br/blog
## Change Vars !!!
SERVER_IP="10.0.2.15"
SERVER_FQDN="gitlab.linuxpro.com.br"
DOMIAN="linuxpro.com.br"
@nullkal
nullkal / gist:6306428
Created August 22, 2013 12:15
FreeBSD向けのMinecraft(bukkit)鯖 起動スクリプト。 必要なもの: Java, tmux, 鯖を配置した各ディレクトリに一つstart.sh(bukkit Wikiに書いてあるLinux用craftbukkit.shそのままでOK)
#!/bin/sh
# PROVIDE: mc-servers
# REQUIRE: LOGIN
. /etc/rc.subr
name="mc_servers"
rcval=mc_servers_enable
@werty1st
werty1st / ufw gufw on fedora
Created September 15, 2013 14:49
ufw gufw on fedora
Sourcen laden:
https://launchpad.net/ufw
https://launchpad.net/gui-ufw
Abhänigkeiten:
sudo yum -y install python-netifaces python-distutils-extra intltool
//mehr waren es bei mir nicht
Installieren:
[ronny@zenbookprime ufw-0.33]$ sudo python setup.py install
@steeve
steeve / _readme.md
Last active March 7, 2024 12:38
How to cross compile Go with CGO programs for a different OS/Arch

How to cross compile Go with CGO programs for a different OS/Arch

It is possible to compile Go programs for a different OS, even though go build says otherwise.

You'll need:

@bibineko
bibineko / bpex.py
Created January 20, 2014 15:37
pexpectを使ってyamaha routerからsshで情報を取ってくる
#! /usr/bin/env python
# -*- coding:utf-8 -*-
""" [NAME] に続くScriptの簡易説明文
[DESCRIPTION] Scriptの詳細説明文
ユーザ名とパスワードの保存にpitを使っている。
username: sshのユーザ
password: パスワード