Skip to content

Instantly share code, notes, and snippets.

@stuart-warren
stuart-warren / hubot-wizard.coffee
Created June 10, 2015 19:39
Hubot Conversation
#
# Description:
# Have a multi-step conversation with hubot
#
# Commands:
# hubot start wizard - Allow hubot to ask you some questions
#
module.exports = (robot) ->
// run with `--harmony`
var ucs2 = require('punycode').ucs2;
function food(){
function *foodz(){
var s = 0x1F354,
e = 0x1F37B,
c = s;
for(;;){
if(c>e){ c = s; };
var AnimationTimer = {};
var _timerId = 0;
var _timerIds = {};
AnimationTimer.setInterval = function(callback, delay) {
var timerId = ++_timerId;
_timerIds[timerId] = setTimeout(function interval() {
requestAnimationFrame(function() {
const double THRESHOLD = 64.0; // +2
// http://makers-with-myson.blog.so-net.ne.jp/2014-04-05
unsigned int on[] = {2552,2680,824,860,820, 860,824,1892,852,1868,824,1896,824,1892,828, 856,828, 856,848,53728,2552,2672,828,860,824, 856,824,1896,852,1864,824,1896,824,1896,852, 828,828, 856,828,53840,2560,2672,828,856,848, 836,824,1892,824,1892,828,1892,852,1868,852, 832,848, 832,828};
unsigned int off[] = {2552,2676,852,832,824,1896,848, 832,828, 856,828,1892,824, 856,852,1868,824,1892,852,53944,2556,2676,824,860,820,1896,828, 856,828, 852,848,1872,824, 856,828,1896,824,1892,824,53844,2552,2676,852,832,824,1896,848, 836,824, 856,828,1892,824, 860,820,1896,828,1888,848};
void setup() {
Serial.begin(115200);
pinMode(12, OUTPUT);
analogReference(INTERNAL);
@vividtone
vividtone / get_redmine_user_list.rb
Last active March 8, 2018 06:02
RedmineからREST APIを使ってユーザーの一覧を取得しCSV形式で出力する
#!/usr/bin/env ruby
# encoding: utf-8
#
# RedmineからREST APIを使ってユーザーの一覧を取得しCSV形式で出力する
#
require 'open-uri'
require 'json'
require 'csv'
@tobynet
tobynet / novel-plot-ジャバ2.md
Last active August 29, 2015 14:09
「ジャバ2」「ジャバ3」のプロット

[ジャバ2], [ジャバ3] のプロット

「ジャバ n」シリーズの位置づけ

「[あなたとジャバ]」の外伝的位置づけ。

主人公は、二億円が欲しいがために様々なトラブルに巻き込まれる。

@ysaotome
ysaotome / niftycloud-api-tools-installer.sh
Last active December 7, 2019 15:52
ニフティクラウドのCLIツール( http://cloud.nifty.com/api/cli/ )を自動セットアップするスクリプトと使用例
#!/bin/bash
# setup NIFTY Cloud API Tools
(
USER=${USER}
HOME=${HOME}
ARC=$(/bin/uname -m)
## OpenJDKセットアップ
/usr/bin/yum -y install java-1.6.0-openjdk.${ARC}
@pistol
pistol / build-tmux.sh
Last active June 10, 2021 09:59
compile tmux from source and statically link with libevent + ncurses
# ncurses
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
tar xvzf ncurses-5.9.tar.gz
cd ncurses-5.9
./configure --prefix=$HOME/local
make -j8
make install
cd ..
# libevent
@monde
monde / .gitignore
Last active February 19, 2020 19:02
Micro Gem to get an OAuth token and secret for the Tumblr.com API allowing an external application to post Tumblr.com blog.
Gemfile.lock
@kawasima
kawasima / RestfulActionServlet.java
Created September 25, 2012 08:15
How to enable PUT and DELETE method in sastruts
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionServlet;
@SuppressWarnings("serial")
public class RestfulActionServlet extends ActionServlet {