Skip to content

Instantly share code, notes, and snippets.

View dot's full-sized avatar
😇

Shuhei KONDO dot

😇
View GitHub Profile
@dot
dot / gist:137452
Created June 29, 2009 03:40
my public key
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAu/RoXQ58sTafUFpjEVUuw0Gk0U6FeUrhZP+XNx8iP9eekBOw71CoeCktl6MPunnRvj1MjltGvzBBETW89kYfbgz/7aWYly2lvq0oC9RK1mPPujoaIprVSn3dqdegrpwEZSuoZRC3PhPL8ncz4eSXBiAN21X9xmq4kBT8iX9Bb3/Zbj8mr/QD/UJROr2wSxjN9frHnlskvTH0N66NQiR46TYxYu8GlibDWWX4EiKhGTkTsdeIbFmedr/npt9e8gUexNvpHtCFW9bA+WoH9Dfwx5aFEtHvdPMr/pPLGq4ZPy7b32Hqw8UnoHJeZKpNQCequfd1AIHspAZAiIF7MNV2Mw== Shuhei KONDO <[email protected]>
@dot
dot / komachi_owners_comments.user.js
Created July 10, 2009 14:31
add toggle button near by pager
// ==UserScript==
// @name KomachiOwnersComments
// @namespace http://dacompatible.net/
// @include http://komachi.yomiuri.co.jp/t/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// ==/UserScript==
(function() {
var state = 'v';
@dot
dot / make.conf
Created November 18, 2009 04:19 — forked from ursm/make.conf
CFLAGS="-march=nocona -O2 -mssse3 -pipe"
CXXFLAGS=$CFLAGS
ACCEPT_KEYWORDS="${ACCEPT_KEYWORDS} ~x86-macos"
MAKEOPTS="-j4"
FEATURES="candy ccache"
EMERGE_DEFAULT_OPTS="--keep-going"
PORTAGE_NICENESS="5"
USE="cjk ipv6 lzma nls threads unicode vim-syntax zsh-completion"
#!/bin/bash
export EPREFIX="$HOME/Library/Gentoo"
export PATH="$EPREFIX/usr/bin:$EPREFIX/bin:$EPREFIX/tmp/usr/bin:$EPREFIX/tmp/bin:$PATH"
export CHOST="x86_64-apple-darwin10"
curl -o bootstrap-prefix.sh http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/scripts/bootstrap-prefix.sh?format=txt
chmod 755 bootstrap-prefix.sh
chmod 755 bootstrap-prefix.sh
@dot
dot / zerigoddns.rb
Created June 27, 2011 10:23
Dynamic DNS updater by dot for Zerigo
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
# Dynamic DNS updater by dot for Zerigo
#
# need gem 'net-dns'
require 'yaml'
require 'ipaddr'
require 'open-uri'
require 'logger'
@dot
dot / intcheck.m
Created July 15, 2011 11:32
check int strict
#import <Foundation/Foundation.h>
#import <Foundation/NSString.h>
#import <Foundation/NSArray.h>
// gcc intcheck.m -framework Foundation && ./a.out
int main(void) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSArray* test = [NSArray arrayWithObjects:@"123aa", @"123.0", @"123", @"-123", nil]; // f, f, t, t
for (NSString* i in test) {
@dot
dot / main.cc
Created September 6, 2011 09:25
messagepack with raw_ref
// g++ -g -O0 -Wall -fPIC -I/usr/local/include/ -L/usr/local/lib/ -lmsgpack main.cc -o main
#include <iostream>
#include <msgpack.hpp>
struct Result {
public:
msgpack::type::raw_ref message;
Result() {}
MSGPACK_DEFINE( message);
@dot
dot / chdir.cc
Created September 7, 2011 08:28
test for chdir & Poco::Path
#include <Poco/Path.h>
#include <Poco/Format.h>
#include <iostream>
#include <unistd.h>
int main(int argc, char** argv) {
std::cout << Poco::format(" current() (Current directory): %s", Poco::Path::current()) << std::endl;
Poco::Path p(Poco::Path::current());
std::cout << Poco::format(" .. : %s", p.forDirectory("..").absolute().toString()) << std::endl;
# require 'coffee-script'
# fb = require './fizzbuzz'
# console.log(fb.fizzbuzz v for v in [1..15])
exports.fizzbuzz = (v)->
f = not(v % 3)
b = not(v % 5)
unless f or b
return v
"#{if f then 'Fizz' else '' }#{if b then 'Buzz' else ''}"
@dot
dot / sparql.rb
Last active December 11, 2015 06:58 — forked from ktym/sparql.rb
#!/usr/bin/env ruby
require "rubygems"
require "net/http"
require "uri"
require "cgi"
require "json" # gem install json
require 'pathname'
class SPARQL