Skip to content

Instantly share code, notes, and snippets.

View gonex45's full-sized avatar
🌴
On vacation

5j gonex45

🌴
On vacation
View GitHub Profile
@gonex45
gonex45 / RamDisk
Last active November 7, 2017 01:31
do shell script "
DISK_SIZE_G=4
if ! test -e /Volumes/RamDisk ; then
echo create ramdisk
diskutil erasevolume HFS+ RamDisk `hdiutil attach -nomount ram://$((${DISK_SIZE_G}*1024*1024*2))`
#Idea
@gonex45
gonex45 / logcat.java
Created August 12, 2015 02:04
show code position in logcat
public static void showLogCat(String tag, String msg) {
StackTraceElement[] stackTraceElement = Thread.currentThread()
.getStackTrace();
int currentIndex = -1;
for (int i = 0; i < stackTraceElement.length; i++) {
if (stackTraceElement[i].getMethodName().compareTo("showLogCat") == 0) {
currentIndex = i + 1;
break;