Skip to content

Instantly share code, notes, and snippets.

View DaikiMaekawa's full-sized avatar

Daiki Maekawa DaikiMaekawa

View GitHub Profile
@xonecas
xonecas / githubFollow.html
Created May 5, 2011 19:05
Github follow me icon/badge/button
<!-- Just replace **USERNAME** by your github username :-) -->
<style>
#followGithub {
color: #121516;
text-shadow: 0 1px 1px #ccc;
padding: 0.2em 0.4em;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
@snaewe
snaewe / run_many.cpp
Created November 25, 2011 15:38
run many jobs in a boost::asio::io_service
// Fixed example from: http://thisthread.blogspot.com/2011/04/multithreading-with-asio.html
void run (int tNumber) // 1.
{
boost::asio::io_service svc; // 2.
boost::thread_group threads;
{
std::auto_ptr<boost::asio::io_service::work> work(new boost::asio::io_service::work(svc)); //3.
for (int i = 0; i < tNumber; ++i) // 4.
@yoggy
yoggy / get_exe_directory.cpp
Created December 19, 2011 10:53
GetModuleFileName() & boost::filesystem sample
std::string get_exe_fullpath()
{
char path[MAX_PATH];
::GetModuleFileName(NULL, path, MAX_PATH);
return std::string(path);
}
std::string get_exe_filename()
{
boost::filesystem::path path(get_exe_fullpath());
@tsuna
tsuna / server.py
Created January 5, 2012 01:44
A simple example of a threaded TCP server in Python.
#!/usr/bin/python
# A simple example of a threaded TCP server in Python.
#
# Copyright (c) 2012 Benoit Sigoure All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright notice,
@technolize
technolize / github-follow-organization.user.js
Created April 21, 2012 16:12
github の organization ページにもフォローボタンを表示する
// ==UserScript==
// @name follow organization
// @description Show follow button on github organization page
// @namespace http://www.technolize.net/
// @include https://github.com/*
// @version 0.1
// @license MIT License
// @work Google Chrome
// ==/UserScript==
#!perl
use 5.14.2;
use WWW::Mechanize;
use Getopt::Long;
use Term::Prompt;
use URI;
my $username;
my $baseurl;
@ngyuki
ngyuki / pre-receive.sh
Created September 5, 2012 13:45
[hatena 20120905] Git でサーバに認証したユーザと Author が同じであることを強制するフックスクリプト
#!/bin/bash
RETVAL=0
while read HASH_OLD HASH_NEW REFNAME; do
(
git log --format=format:"%H%x09%an%x09%ae" ${HASH_OLD}..${HASH_NEW}
echo
) |
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
anonymous
anonymous / color
Created November 1, 2012 15:17
mlterm Solarized color setting
black = #073642
red = #dc322f
green = #859900
yellow = #b58900
blue = #268bd2
magenta = #d33682
cyan = #2aa198
white = #eee8d5
hl_black = #002b36
hl_red = #cb4b16
@osyo-manga
osyo-manga / quickrun.vim
Created March 11, 2013 13:36
quickrun.vim の設定
function! s:quickrun_config()
return unite#sources#quickrun_config#quickrun_config_all()
endfunction
" quickrun-runner {{{
" vimscript_all {{{
let s:runner = {}