Skip to content

Instantly share code, notes, and snippets.

@ajgappmark
ajgappmark / AdWindDecryptor.py
Created July 27, 2018 15:10 — forked from herrcore/AdWindDecryptor.py
Python decryptor for newer AdWind config file - replicated from this Java version https://github.com/mhelwig/adwind-decryptor
#!/usr/local/bin/env python
########################################################################################################
##
## Decrypts the AdWind configiration files!
## ** May also work for other files **
##
##
## All credit to Michael Helwig for the original Java implementation:
## https://github.com/mhelwig/adwind-decryptor
@ajgappmark
ajgappmark / PhonecallReceiver.java
Created August 31, 2018 18:52 — forked from ftvs/PhonecallReceiver.java
Detecting an incoming call coming to an Android device. Remember to set the appropriate permissions in AndroidManifest.xml as suggested in the Stackoverflow link. Usage example in comments. Source: http://stackoverflow.com/a/15564021/264619 Explanation: http://gabesechansoftware.com/is-the-phone-ringing/#more-8
package com.gabesechan.android.reusable.receivers;
import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
public abstract class PhonecallReceiver extends BroadcastReceiver {
@ajgappmark
ajgappmark / main.go
Created October 24, 2018 02:58 — forked from julz/main.go
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {
@ajgappmark
ajgappmark / .gitignore
Created November 5, 2018 21:17 — forked from kogakure/.gitignore
Git: .gitignore file for LaTeX projects
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
@ajgappmark
ajgappmark / truffle-material.md
Created February 2, 2019 10:44 — forked from smarr/truffle-material.md
Truffle: Languages and Material
@ajgappmark
ajgappmark / Makefile
Created June 2, 2019 05:50 — forked from mhitza/Makefile
Programming Arduino Uno (ATmega386P) in assembly
%.hex: %.asm
avra -fI $<
rm *.eep.hex *.obj *.cof
all: $(patsubst %.asm,%.hex,$(wildcard *.asm))
upload: ${program}.hex
avrdude -c arduino -p m328p -P /dev/arduino-uno -b 115200 -U flash:w:$<
monitor:
@ajgappmark
ajgappmark / grep-comparison.sh
Created August 10, 2019 11:30 — forked from theferrit32/grep-comparison.sh
Compare different grep-like methods
#!/bin/bash
if ! which python3 >/dev/null 2>&1; then
echo 'python3 required'
fi
if [ -z "$1" ]; then
echo "greptest.sh <regex|string>"; exit 1
fi
mytime () {
start=`date +%s.%N`
$@ >/dev/null 2>&1
@ajgappmark
ajgappmark / SignUp.js
Created February 29, 2020 19:08 — forked from dabit3/SignUp.js
SignUp form in React Native Navigation - V2
// SignUp.js
import React from 'react'
import {
View,
Button,
TextInput,
StyleSheet
} from 'react-native'
export default class SignUp extends React.Component {
@ajgappmark
ajgappmark / dump-vdso.py
Created June 11, 2020 21:45 — forked from kmcallister/dump-vdso.py
dump vdso
#!/usr/bin/env python
from ctypes import *
for ln in open('/proc/self/maps'):
if "[vdso]" in ln:
start, end = [int(x,16) for x in ln.split()[0].split('-')]
CDLL("libc.so.6").write(1, c_void_p(start), end-start)
break
@ajgappmark
ajgappmark / xclip aliases for startup scripts
Created June 7, 2021 12:27 — forked from yiboyang/xclip aliases for startup scripts
A few xclip aliases to simplify copying/pasting
# to simplify life, install xclip and append the following lines to your .bashrc
alias "c=xclip" # copy to X clipboard (register *)
alias "cs=xclip -selection clipboard" # copy to system wide clipboard (register +)
alias "v=xclip -o" # output copied content (paste)
alias "vs=xclip -o -selection clipboard" # paste from system wide clipboard (equivalent to `v -selection clipboard`)
# examples:
# copy to X:
# go to the same directory in terminal 2 as in terminal 1
# Terminal 1: