Skip to content

Instantly share code, notes, and snippets.

🥁

Felipe Astroza Araya astroza

🥁
Block or report user

Report or block astroza

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
View beck.sh
#!/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
View test.js
import { group, sleep } from 'k6';
import http from 'k6/http';
// Version: 1.2
// Creator: Load Impact k6 Test Script Recorder
export let options = {
stages: [
{
"duration": "1m0s",
View test.lua
http.page_start("Page 1")
http.request_batch({
{"GET", "https://api-cdf-benchmark.firesport.io/event/5593?schedule=true", nil, { ["Accept"]="application/json, text/plain, */*", ["Origin"] = "http://benchmark.cdf.cl.nedp.io", ["Authorization"] = "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiIwODA0N2Q2MS1lNDBhLTRmNGItODlhMS1hZTA4NTM5MGViN2EiLCJ1c2VySWQiOiI1ODYyN2E4ZDliMzkwZjNlMjIyMDk5OWMiLCJub21icmUiOiJOZWQiLCJhcGVsbGlkb1BhdGVybm8iOiJNZWRpYSIsImZvdG8iOiIiLCJmZWNoYV9uYWNpbWllbnRvIjoiMTk3MC0wMS0wMSIsImZlY2hhTmFjaW1pZW50byI6IjE5NzAtMDEtMDEiLCJnZW5lcm8iOiJtYXNjdWxpbm8iLCJlbWFpbCI6ImRldkBuZWQuY2wiLCJlc3RhZG8iOiJjb21wbGV0YWRvIiwicGFzYXJlbGEiOiJjdXBvbiIsIm1hdGVyaWFsIjoiZnVsbCIsImRpc3Bvc2l0aXZvcyI6IjEwIiwiaXNzIjoiYXBpLmNkZi5jbCIsImFwcElkIjoiZWNkZiIsImlhdCI6MTU0NzA0Nzg3MSwiZXhwIjoxNTQ3MDkxMDcxfQ.lIo8FJyi6O6u0STDMov61hwnvP8P3Qi1MUa6v8cnvoy0gunrPX78NUM3JAzz9tHpIxFhndcQ9GfSe7lTIOJOKy_wrnKHAmO6uLQEwzG46FSJR14T7GVkFB3o-ZIHs98sso78AFHCVLEKbbCI4U9lHocubCGtpeqB5ufXDYqosFz3yY4EriqpiCNVvah00wF6QovFCMw0MERK7wqih58A-UQ
@astroza
astroza / mtd2_files
Created Nov 4, 2018
mtd2 full list of files
View mtd2_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 Nov 4, 2018
foscam c1 mtd1 files
View sh
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
View deep_hash.rb
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 Feb 26, 2018
Tool to analyse segments
View check_frames.js
/* 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 = {};
View autoclip-wordpress.user.js
// ==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==
View js_arithmetic.js
// 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)
View nicekill.js
var cp = require('child_process');
function *doKill(process, initial_delay)
{
yield process.kill('SIGTERM');
yield process.kill('SIGKILL');
}
function niceKill(process, onExit, initial_delay)
{
You can’t perform that action at this time.