Skip to content

Instantly share code, notes, and snippets.

@cmbaughman
cmbaughman / remove_pattern_lock.sh
Created Feb 4, 2014
How to break into an Android phone that uses pattern lock...
View remove_pattern_lock.sh
#!/bin/bash
adb shell
cp /data/data/com.android.providers.settings/databases
sqlite3 settings.db
update system set value=0 where name='lock_pattern_autolock'
update system set value=0 where name='lockscreen.lockedoutpermanently'
#It's good to include this part too.
adb shell rm -f /data/system/gesture.key
@cmbaughman
cmbaughman / setup-gnomedev-tools.sh
Created Feb 4, 2014
Automatically set up GNOME development environment (C, C++, Python, and JavaScript), all optional libs, and documentation.
View setup-gnomedev-tools.sh
#!/bin/bash
BH=$(which bash)
echo "Currently using " + $BH
echo " "
echo "update apt repos..."
echo " "
sudo apt-get update
@cmbaughman
cmbaughman / setup-android-dev.sh
Created Feb 4, 2014
Script to set up a complete AOSP development environment on Ubuntu variants by IOKP Team.
View setup-android-dev.sh
#!/bin/bash
#
# Author: mrimp
#
# Description:
# Setup script for AOKP Build Enviroment Ubuntu 13.04
#
# Legal Stuff:
#
# This script is free software; you can redistribute it and/or modify it under
@cmbaughman
cmbaughman / get-wifi-hotspot.md
Created Feb 5, 2014
Turn your Linux Machine into a WiFi Hotspot!
View get-wifi-hotspot.md

Turn Ubuntu based distros into a better WiFi hotspot


Use the following instructions to set up, configure, and run a WiFi hotspot from your computer. Note: The strength will increase with more connections.

  1. Add the following ppa: sudo add-apt-repository ppa:nilarimogard/webupd8
  2. Run: sudo apt-get update && sudo apt-get install ap-hotspot

After install, ap-hotspot must be configured, however first if using any sort of firewall, unblock the following apps:

@cmbaughman
cmbaughman / py-captcha.py
Created Feb 16, 2014
Script to beat CAPTCHA with Python 3
View py-captcha.py
# A script to bypass the Bugcrowd sign-up page captcha
# Created by @pwndizzle - http://pwndizzle.blogspot.com
from PIL import Image
from urllib.error import *
from urllib.request import *
from urllib.parse import *
import re
import subprocess
@cmbaughman
cmbaughman / GetRSSFeed.js
Created Mar 5, 2014
Parse RSS feed as JSON from client using Google API
View GetRSSFeed.js
var rssUrl = "http://www.exploit-db.com/rss.xml";
function parseRSS(url, callback) {
$.ajax({
url: document.location.protocol + '//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=10&callback=?&q=' + encodeURIComponent(url),
dataType: 'json',
success: function(data) {
callback(data.responseData.feed.entries);
}
});
}
View encryption-test.js
var crypto = require('crypto');
function encrypt(text){
var cipher = crypto.createCipher('aes-256-cbc','d6F3Efeq');
var crypted = cipher.update(text,'utf8','hex');
crypted += cipher.final('hex');
return crypted;
}
function decrypt(text){
var decipher = crypto.createDecipher('aes-256-cbc','d6F3Efeq');
var dec = decipher.update(text,'hex','utf8');
View Create_Android_LINUX_Kernel_Driver.c
[QUOTE=llrraa2010;47347928]1. mkdir hello
USER-NAME@MACHINE-NAME:~/Android$ cd kernel/common/drivers
USER-NAME@MACHINE-NAME:~/Android/kernel/common/drivers$ mkdir hello
2. hello.h
#ifndef _HELLO_ANDROID_H_
#define _HELLO_ANDROID_H_
#include
View aptitude_commands_cheatsheet.md

Key commands available when a group is selected

[ - Expand the currently selected group, and all its subgroups

] - Collapse the currently selected group, and all its subgroups

Enter - Expand or collapse the currently selected group.

Key commands available when a package is selected
@cmbaughman
cmbaughman / rails_resources.md
Created Apr 4, 2014 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.
View rails_resources.md

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h