start new:
tmux
start new with session name:
tmux new -s myname
package com.squareup.example; | |
public abstract BaseActivity extends SherlockActivity { | |
private final ScopedBus scopedBus = new ScopedBus(); | |
protected ScopedBus getBus() { | |
return scopedBus; | |
} | |
@Override public void onPause() { |
rsync (Everyone seems to like -z, but it is much slower for me)
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 '/' '.') |
#!/bin/bash | |
# brew install x265 | |
# brew install ffmpeg | |
# brew install youtube-dl | |
# brew install imagemagick | |
ID='U65_uY5N2WM' # YouTube video ID, i.e. https://www.youtube.com/watch?v={ID} | |
# fetch the video file with youtube-dl |
→ cat /Users/chris/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/thrift-0.9.1/ext/gem_make.out | |
/Users/chris/.rbenv/versions/1.9.3-p448/bin/ruby extconf.rb | |
extconf.rb:25: Use RbConfig instead of obsolete and deprecated Config. | |
checking for strlcpy() in string.h... yes | |
creating Makefile | |
make | |
compiling binary_protocol_accelerated.c | |
compiling bytes.c | |
compiling compact_protocol.c |
UPDATE: This is now available as a plugin https://github.com/tbroyer/gradle-errorprone-plugin
To use it, just add the following to your build.gradle
and it'll change all JavaCompile
tasks to use the error-prone compiler:
apply from: 'https://gist.github.com/tbroyer/6847494/raw/errorprone.gradle'
#!/usr/bin/env python2 | |
import SimpleHTTPServer | |
import SocketServer | |
import logging | |
PORT = 8000 | |
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): |
# Copyright (c) 2019 Ori Livneh | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# 1. Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# 2. Redistributions in binary form must reproduce the above copyright | |
# notice, this list of conditions and the following disclaimer in the |
#!/bin/bash | |
./configure --with-ld-opt="-L/my/ssl/location" |