Skip to content

Instantly share code, notes, and snippets.

Stone Gao stonegao

Block or report user

Report or block stonegao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
stonegao / main.go
Created Jul 28, 2019 — forked from julz/main.go
containersched minicontainer
View main.go
package main
import (
func main() {
View Attacking Ruby on Rails Applications
==Phrack Inc.==
Volume 0x0f, Issue 0x45, Phile #0x0c of 0x10
|=--------------=[ Attacking Ruby on Rails Applications ]=---------------=|
|=---------------------=[ joernchen of Phenoelit ]=----------------------=|
|=---------------------=[ ]=----------------------=|
stonegao / rails-jsonb-queries
Created Apr 22, 2019 — forked from mankind/rails-jsonb-queries
Rails-5 postgresql-9.6 jsonb queries
View rails-jsonb-queries
#payload: [{"kind"=>"person"}]
Segment.where("payload @> ?", [{kind: "person"}].to_json)
#data: {"interest"=>["music", "movies", "programming"]}
Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json)
Segment.where("data #>> '{interest, 1}' = 'movies' ")
Segment.where("jsonb_array_length(data->'interest') > 1")
stonegao /
Created Apr 19, 2019 — forked from Integ/
A useful tool for unpack wxapkg file with python3 surport.
# coding: utf-8
# py2 origin author lrdcq
# usage python3 filename
__author__ = 'Integ:'
import sys, os
import struct
class WxapkgFile(object):
stonegao /
Created Feb 28, 2019 — forked from shobotch/
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN
Consumer key:    IQKbtAYlXLripLGPWd0HUA
stonegao /
Created Jan 21, 2019 — forked from XVilka/
True Colour (16 million colours) support in various terminal applications and terminals

Colours in terminal

It's a common confusion about terminal colours... Actually we have this:

  • plain ascii
  • ansi escape codes (16 colour codes with bold/italic and background)
  • 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
  • 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"
stonegao /
Created Nov 29, 2018 — forked from nstarke/
How to make a Release Android App debuggable

How to make a Release Android App debuggable

Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage ( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs), but on a production release app downloaded from an app store you're most likely to see:

run-as: Package 'com.mypackage' is not debuggable
stonegao / AdbCommands
Created Oct 21, 2018 — forked from Pulimet/AdbCommands
Adb useful commands list
View AdbCommands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
stonegao /
Created Oct 21, 2018 — forked from flawyte/
How to get an Android device's serial number, visible to the user in "Settings > About phone/tablet/device > Status > Serial number".
import android.os.Build;
import java.lang.reflect.Method;
public class Device {
* @return The device's serial number, visible to the user in {@code Settings > About phone/tablet/device > Status
* > Serial number}, or {@code null} if the serial number couldn't be found
public static String getSerialNumber() {
stonegao / wxml2html_input.json
Created Jan 2, 2018 — forked from faywong/wxml2html_input.json
微信小程序 wxml2html 的输出
View wxml2html_input.json
{"config":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#fff","navigationBarTitleText":"WeChat","navigationBarTextStyle":"black"},"project":{"appid":"wxd0ef619a89d9b761","appname":"mobileDevDaily","projectpath":"/Users/faywong/Downloads/wxapp_mobiledevdaily","projectid":"wxd0ef619a89d9b761_mobileDevDaily","app_head_img":"","app_nickname":"mobileDevDaily","is_admin":1,"isTourist":false,"urlCheck":false,"hash":685122098,"es6":true,"watcher":true,"editWebview":true,"newFeature":{"time":1484540945002,"show":false,"check":false},"initPath":{"enable":true,"page":"pages/index/index","query":""},"uploadPath":{"enable":false},"postcss":true},"url":"","pageFrameTpl":"\n<!DOCTYPE html>\n<html lang=\"zh-CN\">\n\n<head>\n <link href=\"\" rel=\"Shortcut Icon\">\n <meta http-equiv=\"Content-Security-Policy\" content=\"script-src 'self' * 'unsafe-inline' 'unsafe-eval'\">\n
You can’t perform that action at this time.