Skip to content

Instantly share code, notes, and snippets.

View PyYoshi's full-sized avatar
🌍
Working from The World

MISAWA Yoshihiro PyYoshi

🌍
Working from The World
View GitHub Profile
@PyYoshi
PyYoshi / _.md
Last active August 29, 2015 14:06
Linode 1GB, Conoha 1GB, Sakura VPS 2GB

Linode 1GB

cat /proc/version

# cat /proc/version
Linux version 3.15.4-x86_64-linode45 (maker@build) (gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Mon Jul 7 08:42:36 EDT 2014

cat /proc/cpuinfo

@PyYoshi
PyYoshi / cmdline.log
Last active August 29, 2015 14:06
303sh
androidboot.hardware=qcom user_debug=31 maxcpus=2 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.serialno=356593052817305 androidboot.wakeinfo=65535 androidboot.pmicinfo=6 androidboot.colorver=07 androidboot.fotainfo=0 androidboot.recovery=0 androidboot.hotstandby=0 androidboot.emmc=true androidboot.baseband=msm
@PyYoshi
PyYoshi / HOWTO.md
Last active August 29, 2015 14:06 — forked from tdragonite/HOWTO.md
  1. Get your cookie. Either proxy your iPhone/iPod/iPad and record the cookie using the proxy server of your choice or capture the request using your AP with Wireshark or similar
  2. Make sure you have a cookie like AKCNTYPE=WIFI; AKID=abc; token=expires... and put it in ~/cookie
  3. Find the name and day of the artist you want to load, replace whitespace with underscores.
  4. Launch the script: ./itunes-festival.sh day artist
  5. Have fun.

Working for iTunes Festival September 2014. Also on OS X. Tnx to the original creator!

#!/bin/sh
# 9.8.2O-124_SPUEM-14_S7_USASPDRICS01VFFE1007.0R_USASPDRJBVFFR_P018_A015_p2b_S1FF_fb_CFC.xml
fastboot flash mbm allow-mbmloader-flashing-mbm.bin
fastboot reboot-bootloader
fastboot flash mbmloader mbmloader.bin
fastboot flash mbm mbm.bin
fastboot reboot-bootloader
fastboot flash cdt.bin cdt.bin_signed
fastboot erase cache
fastboot erase userdata
<?php
$var = null;
$start1 = microtime(true);
$i = 0;
while($i < 10000000){
$ret1 = $var === null;
$i++;
}
<?php
use Fluent\Logger\Entity;
use Fluent\Logger\PackerInterface;
class MsgpackPacker implements PackerInterface
{
/**
* pack entity as a msgpack format.
PHP Version: 5.5.12
Json Version: ext/json 1.2.1
Count: 262962
Encode in 0.02131 sec, 1039144 bytes
Decode in 0.07157 sec
Json Version: pecl/jsonc 1.3.5
Count: 262962
Encode in 0.02531 sec, 1039144 bytes
@PyYoshi
PyYoshi / example.ts
Last active March 1, 2016 21:56
sequelize.d.ts
/// <reference path="./sequelize.d.ts" />
// ƪ(•̃͡ε•̃͡)∫ʃ”
import _ = require('sequelize');
var Sequelize = require('sequelize');
// connect to mysql
var sequelize = new Sequelize(
'db_name',
'username',
Mime::Type.register 'application/x-msgpack', :msgpack
# レンダラにmsgpackを追加
ActionController::Renderers.add :msgpack do |data, options|
send_data data.to_msgpack, :type => 'application/x-msgpack'
end
@PyYoshi
PyYoshi / socket.io.d.ts
Created March 24, 2014 08:46
オレオレ定義ファイル
// Type definitions for socket.io
// Project: http://socket.io/
// Definitions by: William Orr <https://github.com/worr>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// Modified by PyYoshi <myoshi321go@gmail.com>
///<reference path='../node/node.d.ts' />
declare module "socket.io" {
import http = require('http');