Skip to content

Instantly share code, notes, and snippets.

View mpyw's full-sized avatar
🏠
Working from home

mpyw mpyw

🏠
Working from home
View GitHub Profile
@chitoku-k
chitoku-k / 20140515001854.html
Created May 14, 2014 15:22
Twitter Activity API Response (Maintenance)
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-us">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Twitter / Maintenance</title>
<link href="//abs.twimg.com/favicons/favicon.ico" rel="shortcut icon" type="image/x-icon">
<link rel="stylesheet" href="//abs.twimg.com/errors/fullscreen_errors.css">
</head>
@sue445
sue445 / 6e8a31fc5d13ebb32de7.md
Last active August 29, 2015 14:02
「技術的負債をなくすには」をリファクタリングしてみた

はじめに

元ネタ:技術的負債をなくすには - Qiita

内容の是非はともかく、文章が羅列してあるだけではっきり言って読みづらいです。

せっかくQiitaはMarkdownが使えるのでMarkdownで読みやすくリファクタリングしてみました。

下記は原文にMarkdown表記を追加したり改行や空白を入れただけで、それ以外は1文字も変更していません


@petamoriken
petamoriken / Retmise.js
Last active September 3, 2015 14:06
自分ならこんな感じに書く Retmise.js
// http://qiita.com/mpyw/items/b7192d3aadf90d55ad49
(function (root) {
"use strict";
// 単純に constructor を外に出してみた。こっちの方が好み。
function Retmise(options) {
if (this.constructor !== Retmise) {
return new Retmise(options);
}
@shibason
shibason / mikusan.rb
Created September 19, 2010 05:52
AA Quine & AA Quine generator (Hatsune Miku)
eval$s=%w~
a=->(b,c, d,e,f){%`#{(c)?"re quire'zlib';":'
'}g=Marshal.load(#{ (c)?'Z lib::Inflate.infl
ate(':''}'#{b}'. unpack('m')[0]#{(c)?')':
''});h= 'eval$s =%w'<<126<<($s*#{d} );i='
';j=- 1; #{ e*f}.times{|k|i<< (g[
k]== 1? h[j+=1]:32);i<<10i f
(k% #{e} ==#{e-1})};i[-7,6]
=' ' < <126<< '.join';puts(i)#`};
$*[ 0]? ( require' RMagick';include(Ma
@sugyan
sugyan / activity.pl
Created December 12, 2011 07:50
Twitter activity API test
#!/usr/bin/env perl
use strict;
use warnings;
use Config::Pit;
use Data::Dumper;
use Furl;
use HTTP::Request::Common;
use JSON::XS 'decode_json';
use OAuth::Lite::Consumer;
@shobotch
shobotch / gist:2882296
Created June 6, 2012 14:40
スマホと振り分け
-------------sortingUa.php-------------
<?php
/**
* スマートフォンかどうかを振り分ける簡易的なクラスです。
*
* @package sortingUa
* @author shobotch
* @sinse PHP 5.3.8
* @version 1.0.0
*/
@gaogao-9
gaogao-9 / 00_usage.js
Last active October 31, 2015 20:24
Array.prototypeをSymbolで汚染する夢が見たかった…(gao_functional.jsが、3つのファイルをconcatしたソースコードです) 現状Firefoxのみ動作可能です
var _ = GaoFunctional();
var input = "114514";
var res = input[_.count]();
console.log(res); // 6
var input2 = [1,1,4,5,1,4];
var res2 = input2[_.count]((x)=>x===1);
console.log(res2); // 3
@seiyaKai
seiyaKai / TwitterAccountSearch.php
Last active December 10, 2015 06:08
くっそ重いです。下手くそですが…Twitterのスクリーンネームの空きを検索してくれます。 $screen_names に検索したいスクリーンネームを入れていってください。 3文字IDとかいろいろ調べられるんじゃね〜みたいな?
<?php
$screen_names = array(); // 検索したいスクリーンネームをarrayのかたちで入れてください
for ($i=0 ; $i<10; $i++){
$screen_names[] = "hogepiyo".$i;
}
$tas = new TwitterAccountSearch();
$tas->Set($screen_names);
$tas->Search();
@pnlybubbles
pnlybubbles / img_analize_test.rb
Last active January 3, 2016 08:19
適当に書いた画像変換プログラム。なにが起きてるかよくわからない。むちゃくちゃ遅い。
# encoding: utf-8
# require "pp"
# require "pry"
require "RMagick"
include Magick
module ImageAnalize
class MagickItem
attr_reader :img
@DQNEO
DQNEO / a.php
Last active February 16, 2016 09:44
PHP5.5で、終了タグ "?>" の有無でパーサの挙動が変わるケース
<?php
declare(encoding='UTF-8');
/* あ */