Skip to content

Instantly share code, notes, and snippets.

View chiehmin's full-sized avatar

Chieh-Min Wang chiehmin

View GitHub Profile
@chiehmin
chiehmin / epub.css
Created May 1, 2019 05:38 — forked from bmaupin/epub.css
You Don't Know JS Ebooks
body {
text-align: justify;
}
code, pre {
font-family: "DejaVuSansMono", monospace;
}
h1, h2, h3, h4, h5, h6 {
text-align: left;
Initialize repo `repo init -u https://github.com/LineageOS/android.git -b lineage-16.0`
create local_manifest in `.repo/local_manifests/htc_oce.xml`
```xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TARKZiM/device_htc_oce" path="device/htc/oce" remote="github" revision="lineage-16.0" />
<project name="TARKZiM/android_kernel_htc_oce" path="kernel/htc/oce" remote="github" revision="lineage-16.0" />
<project name="TARKZiM/proprietary_vendor_htc" path="vendor/htc" remote="github" revision="lineage-16.0" />
This file has been truncated, but you can view the full file.
1 google.com
2 youtube.com
3 facebook.com
4 msn.com
5 amazon.com
6 yahoo.com
7 bing.com
8 ebay.com
9 twitter.com
10 yelp.com
// autogenerated by syzkaller (http://github.com/google/syzkaller)
#include <pthread.h>
#include <sys/timerfd.h>
#define NTHR 8
#define NSET 8
#define TFD_TIMER_CANCEL_ON_SET (1 << 1)
void *thrset(void *arg)
{
#include <bits/stdc++.h>
#include <boost/archive/xml_iarchive.hpp>
#include <boost/archive/xml_oarchive.hpp>
using namespace std;
class Bus {
public:
string name;
int count;
const sort = (arr) => {
const l = arr.length;
for (let i = 0; i < l; i++) {
for (let j = 0; j < l - i; j++) {
if (arr[j] > arr[j + 1]) {
const t = arr[j + 1];
arr[j + 1] = arr[j];
arr[j] = t;
}
}
@chiehmin
chiehmin / android_decompilation_tool.sh
Created May 18, 2016 06:51
apktool, dex2jar, jd-gui installation script
# Installing apktool
mkdir -p ~/.local/bin
wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.1.1.jar -O ~/.local/bin/apktool.jar
wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool -O ~/.local/bin/apktool
chmod a+x ~/.local/bin/apktool
# Installing dex2jar
wget https://github.com/pxb1988/dex2jar/releases/download/2.1-nightly-26/dex-tools-2.1-20150601.060031-26.zip -O ~/.local/bin/dex2jar.zip
unzip ~/.local/bin/dex2jar.zip -d ~/.local/bin/
mv ~/.local/bin/dex2jar-2.1-SNAPSHOT/* ~/.local/bin/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <assert.h>
typedef struct _List {
struct _List *next;
int val;
} List;
#!/bin/busybox sh
#
# By Chih-Wei Huang <cwhuang@linux.org.tw>
# and Thorsten Glaser <tg@mirbsd.org>
#
# Last updated 2014/01/15
#
# License: GNU Public License
# We explicitely grant the right to use the scripts
# with Android-x86 project.
2795 while ((dom->item_in + 1) % SYSCALL_SIZE == dom->item_out && (timeout-- > 0))
2796 {
2797 udelay(100);
2798 }
2799
2800 spin_lock(&dom->syscall_lock);
2801 if ((dom->item_in + 1) % SYSCALL_SIZE == dom->item_out)
2802 {
2803 printk("Domain buffer full !!!!\n");
2804 goto out;