Skip to content

Instantly share code, notes, and snippets.

pacman -S wget git gawk bridge-utils iproute2 bzip2 make gcc clang patch ocaml bison flex gettext autoconf automake libtool python pciutils glibc python3 libvncserver libx11 libaio python zlib ncurses openssl sdl2 bzip2 e2fsprogs git xz yajl pixman dtc glib2 json-c fuse2 xz multipath-tools bin86 iasl

Install from aur

libcurl-openssl-1.0 uuid checkpolicy

Install bcc

@illustris
illustris / gropen.sh
Last active March 27, 2019 04:25
Oneliner to open all grep -rIn matches in gedit one by one
egrep -o '^.*:[0-9]+' | sed -E 's/:([0-9]+)$/\n+\1/' | while read fname; do read lname; gedit "$fname" $lname; done
time ab -k -c 1000 -n 2000000 http://127.0.0.1:3000/
This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 200000 requests
Completed 400000 requests
Completed 600000 requests
Completed 800000 requests
time ab -k -c 1000 -n 2000000 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 200000 requests
Completed 400000 requests
Completed 600000 requests
Completed 800000 requests
time ab -k -c 1000 -n 2000000 http://127.0.0.1:80/
This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 200000 requests
Completed 400000 requests
Completed 600000 requests
Completed 800000 requests
@illustris
illustris / dram0.asm
Created June 14, 2018 12:55
DRAM0_BASE disassembly
POP {R4, R5, R6, R7, R8, PC}
BL #0xFFFB7C0C
TST R4, #0x20
BNE #0xFFFFFFC0
B #0xFFFFFFC8
MOV R0, R5
BL #0xFFFB1698
CMP R0, #0
BNE #0xFFFFFFC0
B #0xFFFFFFD0
#include "libkdump.h"
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
// initialize libkdump
//Configure libkdump
libkdump_config_t config;
//get default config
@illustris
illustris / manual_bisect.py
Created May 3, 2018 13:14
A short script I wrote to manually bisect a list of commits. Git bisect doesn;t play well with repo or submodules
def binsearch(commits):
if len(commits) == 1:
print commits[0]
else:
print commits[(len(commits)-1)/2]
answer = ""
while answer not in ["y", "n"]:
answer = raw_input("Working? [Y/N] ").lower()
if answer == "n":
binsearch(commits[(len(commits)+1)/2 : ])
@illustris
illustris / F612W_dosubmit_bypass.js
Created April 6, 2018 05:37
Modified dosubmit function to bypass captcha on ZTE F612W router login page
function dosubmit()
{
if (getObj("Frm_Username").value == "")
{
getObj("errmsg").innerHTML = "Username cannot be empty.";
getObj("myLayer").style.visibility = "visible" ;
return;
}
else
{
@illustris
illustris / example.c
Created March 25, 2018 06:30
Example code for efficiently tailing a log file
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/inotify.h>
#include <sys/stat.h>
#include <fcntl.h>