Skip to content

Instantly share code, notes, and snippets.

View abhinavn's full-sized avatar

Abhinav Nallagundla abhinavn

View GitHub Profile
@chetanmeh
chetanmeh / currentTopThreads.groovy
Last active August 29, 2015 14:03
Script to determine top threads of current Java process
import java.lang.management.ManagementFactory
displayThreadDumpAlso = false
topJavaThreads = "top -b -n 1 -H | grep java"
jstack = "jstack"
maxThreads = 5
pid = myPid()
def dump = threadDump(pid)
def currentCpu = myCpuUsage(pid)
@maxchuquimia
maxchuquimia / KIFUITestActor+Helper.h
Last active January 13, 2019 21:55
KIF Checking for an Accessibility Element. http://www.wtfpl.net/
//
// KIFUITestActor+Helper.h
//
// Created by Max Chuquimia on 10/04/2014.
//
//
#import "KIFUITestActor.h"
@interface KIFUITestActor (Helper)
@mlegenhausen
mlegenhausen / ds
Created March 5, 2014 11:24
Get directory size via the command line on mac os and linux in a human readable format
#!/bin/sh
find $1 -type f -print0 | xargs -0 stat -f'%z' | awk '{b+=$1} END {print b}' | awk '{ sum=$1 ; hum[1024**3]="Gb";hum[1024**2]="Mb";hum[1024]="Kb"; for (x=1024**3; x>=1024; x/=1024){ if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x];break } }}'
@chetanmeh
chetanmeh / classLoaderLeakAnalyzer.js
Last active January 21, 2020 12:52
Following scripts looks for Classloading Leak suspects for OSGi env. This script needs to be executed from the OQL editor of JHat
var debugEnabled = false
var infoEnabled = true
var traceEnabled = false
//Maximum number of live paths to determine when a leak object is found
var maxPathsToFound = 1
//No of object instances after which a progress message
//is logged
@PDegenPortnoy
PDegenPortnoy / csshX example
Created December 5, 2013 20:33
Use example of csshX to start multiple, simultaneous, interactive SSH sessions
pdp-mbp: ~ $ cat hostlist.txt
sfo-crawl-4
sfo-crawl-5
sfo-crawl-6
sfo-crawl-7
sfo-crawl-8
sfo-crawl-9
sfo-crawl-11
sfo-crawl-14
pdp-mbp: ~ $ csshX --host hostlist.txt
#!/bin/bash
# https://gist.github.com/949831
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/
# command line OTA distribution references and examples
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html
ISRakel::Tasks.instance.edit_preferences do |p|
p.merge!({
"KeyboardAutocapitalization" => false,
"KeyboardAutocorrection" => false,
"KeyboardCapsLock" => false,
"KeyboardCheckSpelling" => false,
"KeyboardLastChosen" => "de_DE@hw=German;sw=QWERTZ-German",
"KeyboardLastUsed" => "de_DE@hw=German;sw=QWERTZ-German",
"KeyboardPeriodShortcut" => false,
"UIKeyboardDidShowInternationalInfoAlert" => true,
@shazron
shazron / list_app_ids_in_provisioning_profiles.sh
Last active December 20, 2015 07:29
List app ids contained in Provisioning Profiles installed on your system. So you can grep for a bundle id.
#!/bin/bash
# You could also launch Xcode Organizer directly to the Provisioning Profiles section (to check for validity) by running:
# open ~/Library/MobileDevice/Provisioning\ Profiles/*
#
# In Xcode 5, you can't get a whole list anymore in Xcode Organizer - you will need to download the iPhone Configuration Utility.
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
@igrigorik
igrigorik / links.md
Created August 28, 2012 16:53
HAR Show links & resources