Skip to content

Instantly share code, notes, and snippets.

View yusukebe's full-sized avatar
😃
Let's go!

Yusuke Wada yusukebe

😃
Let's go!
View GitHub Profile
#!/usr/bin/perl
use strict; # おまじない
use warnings;
use Encode;
use utf8;
# スカラー
my $title = "true tears で学ぶ Perl 入門";
# リスト
@jeffrafter
jeffrafter / handler.js
Created April 2, 2010 20:59
Simple HTTP Server and Router in node.js
exports.createHandler = function (method) {
return new Handler(method);
}
Handler = function(method) {
this.process = function(req, res) {
params = null;
return method.apply(this, [req, res, params]);
}
}
use Acme::Porn::Embed;
my $url = 'http://www.yourfilehost.com/media.php?cat=video&file=backwards_piano_player.flv';
my $embed = Acme::Porn::Embed->new;
my $res = $embed->embed( $url );
$res->type; # now, response type is photo.
$res->title;
$res->url; # thumbnail url.
$res->width;
$res->height;
@josevalim
josevalim / 0_README.markdown
Created January 9, 2012 13:07
Hello world of Sinatra-like libraries on Elixir, Ruby and Node.js
@hirose31
hirose31 / gist:1891020
Created February 23, 2012 06:15
daemontools詰め合わせ
### helper shell function
daemonup() {
[ -z "$1" ] && return
case $1 in
*/*)
DAEMONDIR=$1
;;
*)
if [ -d "$SYS_HOME" ]; then
@jaeschrich
jaeschrich / test.js
Last active July 20, 2022 20:49
A tiny node.js test framework with no dependencies
/*
Example
var test = require('./path/to/test'),
cake = require('..'),
assert = require("assert");
test('eat cake', function(done){
cake.eat();
done();
@ms2sato
ms2sato / file0.js
Created November 6, 2013 13:48
S3へ直接ファイルをアップロードする。Node.js版 ref: http://qiita.com/ms2sato/items/f73a02f2ac14361247c3
var moment = require('moment');
var crypto = require('crypto');
function createS3bucket(params) {
function base64_encode(val) {
var b = new Buffer(val);
return b.toString('base64');
}
@rtt
rtt / tinder-api-documentation.md
Last active May 5, 2024 15:28
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

@cdiener
cdiener / asciinator.py
Last active January 5, 2023 17:24
Convert image to ascii art
import sys; from PIL import Image; import numpy as np
chars = np.asarray(list(' .,:;irsXA253hMHGS#9B&@'))
if len(sys.argv) != 4: print( 'Usage: ./asciinator.py image scale factor' ); sys.exit()
f, SC, GCF, WCF = sys.argv[1], float(sys.argv[2]), float(sys.argv[3]), 7/4
img = Image.open(f)
S = ( round(img.size[0]*SC*WCF), round(img.size[1]*SC) )
img = np.sum( np.asarray( img.resize(S) ), axis=2)
package MySQLCasualLog;
use strict;
use warnings;
use utf8;
use DBIx::QueryLog;
use Term::ANSIColor;
use Text::ANSITable;