Skip to content

Instantly share code, notes, and snippets.

View amboxer21's full-sized avatar

Anthony Guevara amboxer21

  • Brick, New Jersey 08723
View GitHub Profile
I want to ask for some advice. I was sleeping on my sister's couch before i started truck driving due to me losing my job and condo. I decided to sleep in the truck instead because I have more privacy here being that she has two kids there, friends that frequent, neighborhood children come to pay with the kids, a fiance, etc.
So i park in the one place in my hometown that doesn't give truck drivers shit for parking. Walmart kicked me out after threatening to tow me. So a bunch of us (around 9 or 10) park here every weekend.
I'm this photo there is a homeless guy that is parking in one of the spots another truck used to park in. The homeless guy isn't even from this town. He's from Asbury but he stays here in brick NJ because the truck driving school he supposedly goes to is right up the road in Lakewood, it's called Smith and Solomon.
Three weeks ago he knocked on my door at 7 in the morning after i just parked at 2am coming from upstate NY. I asked him what he wanted and he said that he wanted me to move
@amboxer21
amboxer21 / BNWifi.sh
Created August 18, 2022 22:32
I cannot automatically connect to Barnes & Noble's WEP open network. This script circumvents the issue!
#!/bin/bash
wpa_cli flush
wpa_cli add_network
wpa_cli set_network 0 ssid "BNWifi"
wpa_cli set_network 0 key_mgmt NONE
wpa_cli enable_network 0
wpa_cli quit
#save_config
@amboxer21
amboxer21 / depclean.sh
Created July 16, 2022 23:01
A script to remove gentoo atoms that have no omitted version. Should prevent the system removing a package that has no alternative version.
#!/bin/bash
# A script to remove gentoo atoms that have no omitted version. Should prevent the system removing a package that has no alternative version.
readarray -t pkg < <(emerge -av --pretend --quiet --depclean | awk '/^[a-z].*:\s[0-9].*/{if ($NF != "none") { gsub(":","-"); print $1$2 } }')
sudo emerge -av --unmerge $(echo ${pkg[*]})
@amboxer21
amboxer21 / sorting(true numerical sorting) names with numbers using nested list comprehension
Last active July 27, 2021 18:49
sorting(true numerical sorting) names with numbers using nested list comprehension
# sorting a list of strings whos values are ints.
>>> numbers = ['100','11','21','200']
>>> sorted(numbers)
['100', '11', '200', '21']
>>>
# Sorting that same list using list comprehension to convert the values into ints before sorting
>>> numbers = ['100','11','21','200']
>>> sorted([int(n) for n in numbers])
@amboxer21
amboxer21 / script.js
Created June 7, 2021 12:53 — forked from stormwild/script.js
Immediately-Invoked Function Expression (IIFE) / (jQuery Self Executing Closure Pattern) and other useful javascript snippets
// “self-executing anonymous function” (or self-invoked anonymous function)
// Reference: http://stackoverflow.com/questions/188663/jquery-javascript-design-self-executing-function-or-object-literal
;(function($) {
var myPrivateFunction = function() {
};
var init = function() {
import os
import cv2
import time
import cvlib as cv
from cvlib.object_detection import draw_bbox
counter = 0
fps = 24.0
localhost /usr/src/linux # EIX_LIMIT=289 eix x11-misc/* | egrep -i -B3 Description.*file
* x11-misc/3dfb
Available versions: 0.6.1-r1
Homepage: https://sourceforge.net/projects/dz3d/
Description: 3D File Browser
--
* x11-misc/3dfm
Available versions: 1.0-r1
Homepage: https://sourceforge.net/projects/innolab/
Description: OpenGL-based 3D File Manager
#!/bin/bash
path="/usr/bin"
new_kernel_version=$1
current_kernel=`${path}/uname -r`
boot=`${path}/sudo ${path}/fdisk -l | ${path}/awk '/\/.*\*/{print $1}'`
cd /usr/src/linux-${new_kernel_version};
if [[ ! `${path}/mount | ${path}/egrep -io "^${boot} on /boot"` ]]; then

I am using a micro SD Card and an adapter on Gentoo Linux. The SD Card device name is mmcblk0 with 2 partitions. mmcblk0p1 being the boot partition and mmcblk0p2 being the root partition.

Copy the system image to a blank SD Card

anthony@anthony ~ $ sudo dd if=/home/anthony/Documents/IMGs/rpi4b_system_image.img of=/dev/mmcblk0 status=progress bs=512
3218899456 bytes (3.2 GB, 3.0 GiB) copied, 564 s, 5.7 MB/s 
6291456+0 records in
6291456+0 records out
3221225472 bytes (3.2 GB, 3.0 GiB) copied, 573.351 s, 5.6 MB/s
anthony@anthony ~ $
@amboxer21
amboxer21 / ps4_remote_play_wan.sh
Last active January 6, 2020 02:34
iptable rules for my 1200ac openwrt router to allow remote play on Chiaki
IPADDR='192.168.1.224'
SOURCE='192.168.1.0/24'
for PORT in 80 443 9295; do
iptables -I FORWARD -p tcp ! --source $SOURCE -d $IPADDR --dport $PORT -j ACCEPT ;
iptables -I PREROUTING -t nat -p tcp ! --source $SOURCE --dport $PORT -j DNAT --to $IPADDR:$PORT ;
done
for PORT in 9296 9297; do
iptables -I FORWARD -p udp ! --source $SOURCE -d $IPADDR --dport $PORT -j ACCEPT ;