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
#ifndef GNN_PORT_SMART_PTR_HPP_INCLUDED | |
#define GNN_PORT_SMART_PTR_HPP_INCLUDED | |
/** | |
An easy implementation of "smart pointer" | |
The idea is just like shared_ptr in Boost C++ Library: it has a reference | |
counter indicating when to delete the raw pointer. | |
This file is a part of gnn C++ Library by L.INA. |
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
namespace lambda { | |
//////////////////////////////////////////////// | |
// Lambda term | |
namespace term { | |
template<char c> struct var {}; | |
template<typename N, typename M> struct app {}; | |
template<char v, typename M> struct abs {}; |
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
// ==UserScript== | |
// @name picasa_link_to_original | |
// @namespace http://orezdnu.org/ | |
// @description Make link to the original image | |
// @include https://picasaweb.google.com/* | |
// @include http://picasaweb.google.com/* | |
// @version 1 | |
// @grant | |
// ==/UserScript== |
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
#!/bin/sh -e | |
base=`basename "$0"` | |
auth_options=',no-port-forwarding,no-agent-forwarding' | |
lf=' | |
' | |
duser=`id -run` | |
dport=22 | |
dconfig_dir_rel=".ssh/$base/config" |
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
#!/bin/sh -e | |
sshmount_url='https://raw.github.com/gist/4167564/sshmount.sh' | |
sshumount_url='https://raw.github.com/gist/4167564/sshumount.sh' | |
sshmount='sshmount' | |
sshumount='sshumount' | |
bin="$HOME/bin" | |
verbose=0 | |
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
#!/bin/sh -e | |
# /etc/libvirt/hooks/qemu | |
guest="$1" | |
action="$2" | |
try=60 | |
wait=1 | |
lf=' | |
' | |
app='virt-start-hook' |
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
#!/usr/bin/env ruby | |
require 'optparse' | |
require 'rubygems' | |
require 'dbus' | |
class Notification | |
BUS = 'org.freedesktop.Notifications' | |
SERVICE = '/org/freedesktop/Notifications' | |
INTERFACE = BUS |
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
#!/usr/bin/env python | |
import sys | |
if len(sys.argv) > 1 and sys.argv[1] in ['on', 'off']: | |
import ibus | |
bus = ibus.Bus() | |
ic = ibus.InputContext(bus, bus.current_input_contxt()) | |
getattr(ic, sys.argv[1].replace('on','en').replace('off','dis')+'able')() | |
else: |
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
#!/usr/bin/env ruby | |
require 'yaml' | |
require 'optparse' | |
require 'shellwords' | |
require 'logger' | |
require 'gtk2' | |
module Loggable | |
class Logger | |
def initialize(klass, *args) |
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; mode: emacs-lisp; -*- | |
;;; init-loader.el --- | |
;; Author: IMAKADO <[email protected]> | |
;; Author's blog: http://d.hatena.ne.jp/IMAKADO (japanese) | |
;; Prefix: init-loader- | |
;; This file is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation; either version 2, or (at your option) |