Skip to content

Instantly share code, notes, and snippets.

Mihyaeru mihyaeru21

Block or report user

Report or block mihyaeru21

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
@ttdoda
ttdoda / pyonpyon.rb
Last active Aug 4, 2017
あぁ^~端末がぴょんぴょんするんじゃぁ^~
View pyonpyon.rb
#!/usr/bin/env ruby
#
# License: CC0
#
gravity = 3
require 'timeout'
include Math
$stdout.sync = 1
View AXUIWindow.swift
import Cocoa
protocol AXUIWindow {
var title : String { get }
var size : NSSize { get set }
var origin: NSPoint{ get set }
var frame : NSRect { get set }
}
protocol AXUIWindowArray {
@huonw
huonw / blackmagic.rs
Created Jan 15, 2014
do-while loops in Rust
View blackmagic.rs
while {
let x = foo();
bar(x);
x != 0
} {}
View patch-edid.rb
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@JakeWharton
JakeWharton / dex.sh
Last active Dec 1, 2018
`classes.dex` method count helpers. Requires smali/baksmali from https://code.google.com/p/smali/ and dexdump from the build-tools in the Android SDK be on your PATH.
View dex.sh
function dex-method-count() {
cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"'
}
function dex-method-count-by-package() {
dir=$(mktemp -d -t dex)
baksmali $1 -o $dir
for pkg in `find $dir/* -type d`; do
smali $pkg -o $pkg/classes.dex
count=$(dex-method-count $pkg/classes.dex)
name=$(echo ${pkg:(${#dir} + 1)} | tr '/' '.')
@STAR-ZERO
STAR-ZERO / FontFitTextView.java
Created Jun 15, 2012
【Android】横幅に合わせてテキストサイズを調整するTextView
View FontFitTextView.java
import android.content.Context;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.widget.TextView;
/**
* サイズ自動調整TextView
*
*/
You can’t perform that action at this time.