Skip to content

Instantly share code, notes, and snippets.

View typester's full-sized avatar
😇

Daisuke Murase typester

😇
View GitHub Profile
#!ruby -Ku
class << (_ = × = 来週も見てくださいね! = 'ひだまりスケッチ×365 ')
def / x=/_/x
sub! /(.*)/, ''; print $1
self
end
def < x=/_/x
print open(caller.first.split(':').first).read.split(/\s/)[-2..-1].join(' ')
end
atom.workspaceView.command "me:newline-and-indent", ->
editor = atom.workspace.getActiveEditor()
editor.insertNewline()
editor.autoIndentSelectedRows()
#!/bin/sh
PATH=$HOME/homebrew/bin:$PATH
if [ -n "$TMUX" ]; then
echo "already in tmux session!!"
exit
fi
HELPER_RUNNING=$(ps aux | grep "[u]im-tmux-helper" 2>/dev/null)
---
# restrict domain. optional
domain: gmail.com
# document root for static files
htdocs: ./
proxy:
- path: /influxdb
dest: http://127.0.0.1:8086
import Foundation
class HTTP {
class Request {
enum Method: String {
case GET = "GET"
case HEAD = "HEAD"
case POST = "POST"
case PUT = "PUT"
- name: install gems
gem: executable=/opt/sensu/embedded/bin/gem name={{ item }} state=present user_install=no
sudo: yes
with_items:
- influxdb
- influxdb-cli
- mysql2
- rb-readline
#!/bin/sh
export iphonefs=$HOME/tmp/iphone/iPhone2.1
export target=arm-apple-darwin9
export leopardsdk=$HOME/tmp/iphone/Developer/SDKs/MacOSX10.5.sdk
export leopardinc=${leopardsdk}/usr/include
export leopardlib=${leopardsdk}/System/Library/Frameworks
export iphoneplt=$HOME/tmp/iphone/Developer/Platforms/iPhoneOS.platform
package Module::Setup::Flavor::iPhoneApp;
use strict;
use warnings;
use base 'Module::Setup::Flavor';
1;
=head1
Module::Setup::Flavor::iPhoneApp - pack from iphone
## MySQL DB Schema
CREATE TABLE user (
id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) NOT NULL
);
CREATE TABLE bookmark (
id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
user INTEGER UNSIGNED NOT NULL, -- user.id
url VARCHAR(255) NOT NULL
use FindBin::libs;
use Benchmark qw/cmpthese/;
use Array::Diff 0.05;
use Algorithm::Diff;
use Algorithm::Diff::XS;
my $d = Array::Diff->new({ diff_class => 'Algorithm::Diff' });
my $xs = Array::Diff->new({ diff_class => 'Algorithm::Diff::XS' });