Skip to content

Instantly share code, notes, and snippets.

@butterflysky
butterflysky / gist:55348399cffdcb624902cce9a187e63a
Created August 3, 2020 17:59
my java environment management setup
❯ cat ~/.zsh-config/autoload/jdk
if [ -z "$1" ] ; then
echo "$0: you must specify a jdk version as an argument - see installed jvms below:" 1>&2
/usr/libexec/java_home -V 1>&2 && true
return
fi
JAVA_HOME=$(/usr/libexec/java_home -v"$1")
if [ $? -ne 0 ] ; then
root@RBR850:/# cat /etc/init.d/secure_storage_init
#!/bin/sh
START=95
MTD_DEV="/dev/mtd23"
MTD_BLK="/dev/mtdblock23"
VIRT_PART_NUM=`cat /proc/mtd | grep virtual | cut -d: -f1 | cut -c 4,5`
#Done during manufacturing stage - Will not be part of init script
root@RBR850:/# find /proc -mindepth 2 -maxdepth 2 -name exe | xargs stat 2>/dev/
null | egrep '^ File' | awk '{print $4}' | sort -u
'/bin/busybox'
'/sbin/abFifo'
'/sbin/acos_wps_led'
'/sbin/acos_wpsd'
'/sbin/askfirst'
'/sbin/ext_led_ctrld'
'/sbin/logd'
### Keybase proof
I hereby claim:
* I am butterflysky on github.
* I am lina (https://keybase.io/lina) on keybase.
* I have a public key ASBL41re7Yy0Q2KmDw6m4WgE39h-uYm320RRqtQhI4IDsQo
To claim this, I am signing this object:
version: '3'
services:
coordinator:
image: lewuathe/presto-coordinator:309
ports:
- "10003:8080"
command: coordinator
worker0:
image: lewuathe/presto-worker:309
@butterflysky
butterflysky / gist:7b5a3bf416655ca672601dac524d176d
Created June 28, 2019 18:04
whois -h whois.arin.net 69.72.42.15
#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/resources/registry/whois/tou/
#
# If you see inaccuracies in the results, please report at
# https://www.arin.net/resources/registry/whois/inaccuracy_reporting/
#
# Copyright 1997-2019, American Registry for Internet Numbers, Ltd.
#
@butterflysky
butterflysky / benchmark_fib.py
Last active December 24, 2016 23:16 — forked from ivanyu/matrix_fib.py
Fibonacci number in O( log N ) operations.
import time
import random
class MatrixFibonacci:
A = [[1, 1],
[1, 0]]
def __init__(self):
self.__memo = {}

Keybase proof

I hereby claim:

  • I am anilybba on github.
  • I am lina (https://keybase.io/lina) on keybase.
  • I have a public key whose fingerprint is A77E 46FD 489E 2EE5 4213 683F 21F0 A9C5 F9B3 26B1

To claim this, I am signing this object:

@butterflysky
butterflysky / level0.c
Created September 4, 2012 11:59
my attempt at level0 on vortex wargame at www.overthewire.org
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/ip.h>
#include <netdb.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <byteswap.h>