Skip to content

Instantly share code, notes, and snippets.

@astroza
astroza / ReformString.s
Created April 16, 2021 01:10
ReformString
.arch armv5t
.fpu softvfp
.text
.syntax unified
.align 2
.global ReformString
.type ReformString, %function
ReformString:
push {r2, r3}
cmp r1, #0
@astroza
astroza / boost.rb
Last active June 29, 2020 03:11
Boost 1.73
class Boost < Formula
desc "Collection of portable C++ source libraries"
homepage "https://www.boost.org/"
revision 3
head "https://github.com/boostorg/boost.git"
stable do
url "https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.bz2"
sha256 "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402"
@astroza
astroza / boost.rb
Created June 28, 2020 23:59
Boost formula without patch for HEAD version
class Boost < Formula
desc "Collection of portable C++ source libraries"
homepage "https://www.boost.org/"
revision 3
head "https://github.com/boostorg/boost.git"
stable do
url "https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.bz2"
mirror "https://dl.bintray.com/homebrew/mirror/boost_1_72_0.tar.bz2"
sha256 "59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722"
@astroza
astroza / beck.sh
Created January 14, 2019 02:23
BeckVM
#!/bin/bash
vmsMount=$(mount|grep /Users/felipe/vms)
if [ "x$vmsMount" == "x" ]; then
sudo mount -t nfs -o resvport 192.168.3.173:/export/vms /Users/felipe/vms
fi
cd /Users/felipe/vms/beck
# Linux
@astroza
astroza / mtd2_files
Created November 4, 2018 21:20
mtd2 full list of files
felipe@astroza-macmini:~/projects/foscamc1$ find _mtd2.extracted/squashfs-root
_mtd2.extracted/squashfs-root
_mtd2.extracted/squashfs-root/mtd_ext
_mtd2.extracted/squashfs-root/mtd_ext/app_ext
_mtd2.extracted/squashfs-root/mtd_ext/app_ext/diff_cn
_mtd2.extracted/squashfs-root/mtd_ext/app_ext/diff_cn/js
_mtd2.extracted/squashfs-root/mtd_ext/app_ext/diff_cn/js/main.js
_mtd2.extracted/squashfs-root/mtd_ext/app_ext/diff_cn/js/class.js
_mtd2.extracted/squashfs-root/mtd_ext/app_ext/diff_cn/html
_mtd2.extracted/squashfs-root/mtd_ext/app_ext/diff_cn/html/login.html
@astroza
astroza / sh
Created November 4, 2018 20:48
foscam c1 mtd1 files
felipe@astroza-macmini:~/projects/foscamc1$ find _mtd1.extracted/
_mtd1.extracted/
_mtd1.extracted/_3BFC.extracted
_mtd1.extracted/_3BFC.extracted/1B68FD.crt
_mtd1.extracted/_3BFC.extracted/4FD8E8
_mtd1.extracted/_3BFC.extracted/_4FD8E8.extracted
_mtd1.extracted/_3BFC.extracted/_4FD8E8.extracted/cpio-root
_mtd1.extracted/_3BFC.extracted/_4FD8E8.extracted/cpio-root/bin
_mtd1.extracted/_3BFC.extracted/_4FD8E8.extracted/cpio-root/bin/scriptreplay
_mtd1.extracted/_3BFC.extracted/_4FD8E8.extracted/cpio-root/bin/gunzip
@astroza
astroza / deep_hash.rb
Created March 6, 2018 17:35
Deep hash
def index_path(deep_hash, path)
sp = path.split("/")
d = 0
while d < sp.length
hk = sp.slice(sp.length - d - 1, sp.length)
if deep_hash[d] == nil
deep_hash[d] = {}
end
l = deep_hash[d][hk]
if l == nil
@astroza
astroza / check_frames.js
Created February 26, 2018 19:10
Tool to analyse segments
/* fastroza@ned.cl
*/
const spawn = require('child_process').spawn;
const frame_regex = /\[FRAME\]\n([\/\w=\n\.:\d\-_\s]*)\[\/FRAME\]\n/g;
const value_regex = /([\w_]*)=([\/\d\.\w_:]*)/g;
function digest_frame(str)
{
ret = {};
// ==UserScript==
// @name Autoclip
// @namespace http://nedmedia.io
// @version 0.1
// @description try to take over the world!
// @author F
// @update https://gist.github.com/astroza/ff89cc940b33ad9319bf3ae8ae6da641/raw/17f3e11fda0f4c7831bc232870c4971165f9bf42/autoclip-wordpress.user.js
// @match http://*/wp/wp-admin/post.php?post=*
// @grant none
// ==/UserScript==
// fastroza (TM)
// Comments about https://mobile.twitter.com/lukaseder/status/867080556470730752
var js_behavior = false
function add(_x, _y) { // (x) + (b)
// Normalization to Number
var x = +_x
var y = +_y
if(!js_behavior)