Skip to content

Instantly share code, notes, and snippets.

@alterakey
alterakey / evernote-push.py
Created October 13, 2013 15:51
Minimalistic text pusher for Evernote
import sys
import re
import os
import evernote
import evernote.api.client
import evernote.edam.type
import datetime
dev_token = # token here
client = evernote.api.client.EvernoteClient(token=dev_token)
@alterakey
alterakey / .emacs
Created August 18, 2013 06:21
Evading Emacs' mutual file modification detection mechanism
(defalias 'ask-user-about-supersession-threat '(lambda (fn) nil))
(defalias 'verify-visited-file-modtime '(lambda (&optional p) t))
@alterakey
alterakey / Makefile-minimal-ndk.8b
Created July 21, 2013 08:49
An minimal Makefile for building ELF executable binary under the Android NDK r8b
CFLAGS=-Os
ndkroot=/usr/local/android-ndk.8b
platformroot=$(ndkroot)/platforms/android-14/arch-arm/
cc=$(ndkroot)/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/arm-linux-androideabi-gcc
cflags_all=$(CFLAGS)
cppflags_all=$(CPPFLAGS) --sysroot=$(platformroot)
ldflags_all=$(LDFLAGS) --sysroot=$(platformroot)
all: hello
@alterakey
alterakey / generate-shellcode.py
Last active December 7, 2016 11:14
Crude exploit tool (shellcode generator) for io.smashthestack.org (level<11)
#!/usr/bin/python
# io.smashthestack.org (level ~10) exploit tool
# alterakey <[email protected]>
import sys
import math
import re
import shutil
import tempfile
import subprocess
@alterakey
alterakey / adb-wrapper.sh
Created March 30, 2013 03:04
An quick adb wrapper to exclude BT tethering cruds from logcat
#!/bin/sh
# use as: cp adb-wrapper.sh ~/bin/adb (somewhere in your PATH)
here=`dirname $0`
adb=`env PATH="${PATH/$here//}" which adb`
$adb $@ | grep --line-buffered -v ' bta_pan_co_tx_path,'
@alterakey
alterakey / abe-java6.patch
Last active December 15, 2015 14:29
A quick patch to adapt the Android Backup Extractor ( https://github.com/nelenkov/android-backup-extractor ) to be run on Java SE 6 / Bouncy Castle 149
From e134c55979f63a48868189b82b5c1ac4ad03fd0a Mon Sep 17 00:00:00 2001
From: Takahiro Yoshimura <[email protected]>
Date: Fri, 13 Sep 2013 11:41:50 +0900
Subject: [PATCH] Porting to Java 6/BC-149
---
abe.sh | 6 +++---
build.xml | 4 ++--
src/org/nick/abe/AndroidBackup.java | 6 +++---
3 files changed, 8 insertions(+), 8 deletions(-)
@alterakey
alterakey / android-jdb-attach.sh
Created March 3, 2013 15:43
Android debugger attacher
#!/bin/sh
pid="$1"
if test -z "$pid"; then
echo "usage: $0 <pid>"
echo "debuggable PIDs:"
adb jdwp
exit 1
fi
adb forward tcp:8600 jdwp:"$1"
rlwrap jdb -attach localhost:8600
@alterakey
alterakey / ArbitraryCursorLoader.java
Last active December 13, 2015 19:48
An experimental CursorLoader implementation, free from ContentProvider
/*
* Copyright (C) 2013 Takahiro Yoshimura <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@alterakey
alterakey / format.sh
Last active December 12, 2015 09:08
Script to use Eclipse formatter from the command line
#!/bin/sh
#
# Copyright 2013 Takahiro Yoshimura
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@alterakey
alterakey / TwitterAuthService.java
Last active December 11, 2015 20:48
One-off, in-app, Twitter4j sign-on example
/*
* Copyright 2013 Takahiro Yoshimura
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software