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
<iframe src="http://www.slideshare.net/slideshow/embed_code/15231713" width="597" height="486" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"> </iframe> |
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
// Note: Some Emscripten settings will significantly limit the speed of the generated code. | |
// Note: Some Emscripten settings may limit the speed of the generated code. | |
try { | |
this['Module'] = Module; | |
} catch(e) { | |
this['Module'] = Module = {}; | |
} | |
// The environment setup code below is customized to use Module. | |
// *** Environment setup code *** | |
var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function'; |
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 -*- | |
# blink(1) eartuqake.gem plugin to blink by each user's icon color | |
# | |
require 'rubygems' | |
require 'rmagick' | |
def getRGB(url) | |
@rgb ||= {} | |
if (@rgb["#{url}"].nil?) | |
image = Magick::Image.read(url).first.resize!(1, 1) |
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
require 'rubygems' | |
require 'rmagick' | |
width = 100 | |
height= 100 | |
url = 'https://si0.twimg.com/profile_images/3345985110/ce68eba70a439a797006d8451dbe51a7_bigger.gif' | |
image = Magick::Image.read(url).first | |
image.resize!(1, 1) | |
color = image.get_pixels(0, 0, 1, 1)[0]; |
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
"==================================================================================================== | |
" OS | |
"==================================================================================================== | |
" {{{ | |
let s:is_win = has('win32') || has('win64') | |
let s:is_mac = has('mac') || system('uname') =~? '^darwin' | |
let s:is_linux = !s:is_mac && has('unix') | |
" }}} | |
"==================================================================================================== |
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 GoogleReader plus Hatena | |
// @namespace http://zero-code.com/category/googlereader_puls_hatena | |
// @description GoogleReader上にはてなブックマークのコメントを表示する | |
// @author zero-code | |
// @version 0.1.0 | |
// @include http://www.google.*/reader/* | |
// @include https://www.google.*/reader/* | |
// @exclude *.css | |
// @exclude *.js |
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
var http = require('http'); | |
var data = '<?xml version="1.0"?>' + | |
'<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">' + | |
'<s:Body>' + | |
'<u:GetExternalIPAddress xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">' + | |
'</u:GetExternalIPAddress>' + | |
'</s:Body>' + | |
'</s:Envelope>'; |
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
var phantom_sync = require('phantom-sync'); | |
var phantom = phantom_sync.phantom; | |
var sync = phantom_sync.sync; | |
var cheerio = require('cheerio'); | |
sync(function() { | |
var ph = phantom.create(); | |
page = ph.createPage(); | |
// ページが読み込まれたら page.onCallback を呼ぶ |
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
// | |
// ViewController.m | |
// AsioTest | |
// | |
// Created by hecomi on 2012/12/31. | |
// Copyright (c) 2012年 hecomi. All rights reserved. | |
// | |
#import "ViewController.h" | |
#include <dispatch/dispatch.h> |
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
#include <boost/asio.hpp> | |
#include <boost/bind.hpp> | |
#include <boost/function.hpp> | |
#include <boost/thread.hpp> | |
#include <boost/system/system_error.hpp> | |
#include <iostream> | |
using namespace std; | |
namespace asio = boost::asio; | |
using boost::asio::ip::tcp; |