This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.ypresto.utils.squareview; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.widget.FrameLayout; | |
/** | |
* FrameLayout enforces its aspect ratio to 1:1. | |
* NOTE: wrap_content is not supported. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ uname -a | |
Linux (hostname) 3.14.25-23.45.amzn1.x86_64 #1 SMP Wed Dec 3 21:29:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux | |
$ cat /proc/sys/vm/vfs_cache_pressure | |
100 | |
$ free -m | |
total used free shared buffers cached | |
Mem: 996 922 74 0 28 133 | |
-/+ buffers/cache: 760 236 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
message="$TRAVIS_REPO_SLUG $TRAVIS_BRANCH build failed <!channel>" | |
payload="payload={\"text\": \"${message}\"}" | |
curl --silent --max-time 5 --data "${payload}" "https://hooks.slack.com/services/${SLACK_TOKEN}" | grep -Ei '^ok$' > /dev/null || echo 'Failed to notify.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Place this on chroot target dir. | |
umount=0 | |
[ "$1" = "-u" ] && umount=1 | |
for dir in dev proc sys; do | |
if (( $umount )); then | |
umount ./$dir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Namespace('brook.rxjsbridge') | |
.use('brook promise') | |
.define(function(ns) { | |
'use strict'; | |
var observableFromPromise = function(promise, value) { | |
return Rx.Observable.create(function(observer) { | |
var called = false; | |
var throwIfCalled = function() { | |
if (called) { | |
throw new Error('promise resolved twice.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
#package UrlFile; | |
use Config::Simple; | |
use File::Basename; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
#package UrlFile; | |
use Config::Simple; | |
use File::Basename; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch --commit-filter ' | |
GIT_AUTHOR_NAME="Yuya Tanaka"; | |
GIT_AUTHOR_EMAIL="yuya.tanaka.i@gmail.com"; | |
GIT_COMMITTER_NAME="Yuya Tanaka"; | |
GIT_COMMITTER_EMAIL="yuya.tanaka.i@gmail.com"; | |
git commit-tree "$@";' HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ponyoponyo() { | |
beep -p 523.3 50 ; beep -p 440.0 25 ; beep -p 349.2 50 | |
beep -p 261.6 25 | |
beep -p 261.6 25 | |
beep -p 261.6 25 | |
beep -p 30000 0 | |
beep -p 293.7 25 ; beep -p 349.2 25 ; beep -p 466.2 25 ; beep -p 587.3 25 | |
beep -p 523.3 50 ; beep -p 30000 25 ; beep -p 440.0 25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ponyoponyo() { | |
beep -f 523.3 -l 500 -n -f 440.0 -l 250 -n -f 349.2 -l 500 -n -f 261.6 -l 250 -r 3 -D 0 | |
beep -f 293.7 -l 250 -n -f 349.2 -l 250 -n -f 466.2 -l 250 -n -f 587.3 -l 250 | |
beep -f 523.3 -l 500 -D 250 -n -f 440.0 -l 250 | |
} | |
aoiumikara() { | |
beep -f 466.2 -l 250 -n -f 392.0 -l 250 -r 2 -D 0 -n -f 466.2 -l 250 |
OlderNewer