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 | |
# | |
# Install dionaea on Ubuntu 10.04 | |
# | |
# Based on: http://dionaea.carnivore.it/#compiling | |
# | |
# keep privileged state(bad hack...) | |
LOCKFILE=$$.pid | |
touch $LOCKFILE |
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/env python3 | |
""" | |
Backup own bitbucket repositories to the specific directory | |
Usage: backup-bitbucket-repository.py USERNAME BACKUP_TARGET_DIR | |
""" | |
import urllib.request | |
import keyring | |
import json | |
import os |
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 | |
# -*- coding: utf-8 -*- | |
import SocketServer | |
import BaseHTTPServer | |
import httplib, urlparse | |
import socket | |
import StringIO | |
import time |
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 | |
# Setting up the new enviromnet. | |
ORIGIN=http://USERNAME@gitrepos.example.com/git/dotfiles.git/ | |
ORIGIN=ssh://USERNAME@gitrespos.example.com:20022/git/dotfiles.git/ | |
cd $HOME | |
git init | |
git remote add origin ${ORIGIN} | |
git config branch.master.merge refs/heads/master |
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
<?php | |
echo $_SERVER["REMOTE_ADDR"]; |
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 | |
# -*- coding: utf-8 -*- | |
import subprocess | |
import binascii | |
import os | |
interface = "tap0" | |
## Get current ipv6 address | |
cmd = "ifconfig {0}|grep -e 'inet6.*global'|awk '{{print $2}}'" |
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
diff --git a/libskk/state.vala b/libskk/state.vala | |
index 257bf15..3864fcf 100644 | |
--- a/libskk/state.vala | |
+++ b/libskk/state.vala | |
@@ -699,7 +699,6 @@ namespace Skk { | |
state.surrounding_end)); | |
} | |
state.rom_kana_converter.reset (); | |
- state.input_mode = entry.value; | |
state.handler_type = typeof (NoneStateHandler); |
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 | |
DEBUG="" | |
#DEBUG="--dry-run -vv" | |
MOUNTPOINT="/mnt/qb/common" | |
BACKUPROOT="${MOUNTPOINT}/backup/${HOSTNAME%.*}" | |
mount_backuppoint() { | |
## バックアップ先のマウント |
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 dbus | |
bat_bus = dbus.SystemBus() | |
bat_object = bat_bus.get_object('org.freedesktop.UPower', | |
'/org/freedesktop/UPower/devices/battery_BAT0') | |
bat_interface = dbus.Interface(bat_object, | |
'org.freedesktop.DBus.Properties') | |
percentage = bat_interface.Get("org.freedesktop.UPower.Device", | |
"Percentage" |
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/ruby | |
# -*- coding: utf-8 -*- | |
require "julius" | |
require "twitter" | |
Twitter.configure do |config| | |
config.consumer_key = '' | |
config.consumer_secret = '' | |
config.oauth_token = '' |