Skip to content

Instantly share code, notes, and snippets.

Clear Skies!

Allen Zhong AstroProfundis

Clear Skies!
Block or report user

Report or block AstroProfundis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ma34s
ma34s / aojp_cm12.xml
Created Feb 17, 2015
local_manifests for CM12 based AOJP
View aojp_cm12.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- JPN IME -->
<project path="packages/inputmethods/OpenWnn" name="CyanogenMod/android_packages_inputmethods_OpenWnn" />
<!-- SAMSUNG DEVICE -->
<project name="kbc-developers/proprietary_vendor_samsung" path="vendor/samsung" remote="github" />
<project name="aojp/android_hardware_samsung" path="hardware/samsung" remote="github" />
<!-- SC02E/SC03E COMMON -->
<project name="kbc-developers/android_device_samsung_smdk4412-common" path="device/samsung/smdk4412-common" remote="github" />
@ipconfiger
ipconfiger / Test.html
Created Mar 12, 2013
山寨版SSL,HTML端Javascript用公钥加密密码,在Python端用私钥解密活得明文密码。这样在POST传输 的过程中就是加密了的密码了,公钥可以直接输出到HTML。 javascript使用了https://github.com/ziyan/javascript-rsa 这个库 第一步通过 命令 生成私钥: openssl genrsa -out privatekey.key 1024 通过私钥生成公钥: openssl rsa -in privatekey.key -pubout -out pubkey.key
View Test.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="/jquery.js"></script>
<script src="/jsbn.js"></script>
<script src="/rsa.js"></script>
<script src="/sha1.js"></script>
<script type="text/javascript">
function encrypt() {
@muffinresearch
muffinresearch / gist:7488742
Last active Aug 12, 2016 — forked from jberkel/gist:1087757
A way to get mkbootimg / mkbootfs without needing to download epic amounts of android src. /hattip @jberkel
View gist:7488742
mkdir ~/android-tools/
cd ~/android-tools/
wget https://android.googlesource.com/platform/system/core/+archive/master.tar.gz
tar -xzf master.tar.gz
cd libmincrypt
gcc -c *.c -I../include
ar rcs libmincrypt.a *.o
cd ../mkbootimg
gcc mkbootimg.c -o mkbootimg -I../include ../libmincrypt/libmincrypt.a
@crossroads1112
crossroads1112 / !!
Last active Feb 9, 2017
Repeat most recent command in fish
View !!
# Add this to your ~/.config/fish/config.fish
# Syntax:
# To just rerun your last command, simply type '!!'
# '!! sudo' will prepend sudo to your most recent command
# Running !! with anything other than sudo will append the argument to your most recent command
# To add another command to prepend list remove the # on line 10 and put the command in the quotes. Repeat as needed
function !!;
set prevcmd (history | head -n 1)
if test "$argv"
if test "$argv" = "sudo" #; or "any other command you want to prepend"
@ergatea
ergatea / gist:4487615
Created Jan 8, 2013
Shadowsocks 启动脚本
View gist:4487615
Shadowsocks 启动脚本
# insserv -v -d /etc/init.d/shadowsocks
=====================
#!/bin/sh
### BEGIN INIT INFO
# Provides: shadowsocks
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
@veproza
veproza / AGPS.md
Last active Aug 28, 2019
Getting u-blox MAX-7C GPS to work with Assisted A-GPS
View AGPS.md

Getting u-blox MAX-7C GPS to work with Assisted A-GPS

So you got your u-blox GPS and wired it up only to look at it struggling to get a valid fix? Under less than ideal conditions, it can take a better part of half an hour. That's because unlike your smartphone GPS, it doesn't have the luxury of having downloaded all the auxiliary navigation data (almanacs and the lot) out-of-band, via fast mobile connection. Instead it relies on the satellite's signal itself, which is being transmitted to you at meager 50 bits per second (I'm not missing "kilo" there, it's three orders of magnitude slower than your 2G GPRS connection).

Luckily, the u-blox receivers are fitted with what the company calls "AssistNow" capability and it does exactly the same thing your iPhone does - feeds the GPS with pre-downloaded almanacs, speeding up the acquisition process to mere seconds.

In principle, the process looks easy enough - we just need to download the data, and then push them to the receiver. Sadly, the AssistNow documentat

@jberkel
jberkel / gist:1087757
Created Jul 17, 2011
HOWTO: compile mkbootimg/mkbootfs
View gist:1087757
get Android source code: http://source.android.com/source/downloading.html
$ cd /path/to/android-src
$ cd system/core/libmincrypt/
$ gcc -c *.c -I../include
$ ar rcs libmincrypt.a *.o
$ cd ../mkbootimg
$ gcc mkbootimg.c -o mkbootimg -I../include ../libmincrypt/libmincrypt.a
$ cd ../cpio
$ gcc mkbootfs.c -o mkbootfs -I../include
You can’t perform that action at this time.