Skip to content

Instantly share code, notes, and snippets.

View trilom's full-sized avatar
🏠
always...Working from Home

Bryan Killian trilom

🏠
always...Working from Home
View GitHub Profile
@trilom
trilom / readme.md
Created June 4, 2022 00:42
Docker container work on UXG-Pro

Run something on boot for UXG

Prepare UXG:container:whoami

This is the "thing you want to run" like pihole, I am using a simple web server.

You'll want to prepare a tar of the container

#### FROM CLIENT (your laptop)
@trilom
trilom / japanese.hcl
Last active December 7, 2020 01:58
Any weebs know if this is anatomically correct?
source "null" "words" {
}
build {
name = "utils.words"
sources = ["null.words"]
provisioner "shell-local" {
# setulimit, this works with macbook https://gist.github.com/gerardkok/8e61df7bbb132522b8232fb3841ae3b4
# http(ie) is required here, curl could work
inline = concat(["ulimit -n 524288"],[
"mkdir -p ${path.cwd}/inventory",
@trilom
trilom / healthy
Last active May 15, 2020 19:39
unifi poe
Device TOP: Connected
BusyBox v1.23.2 (2020-01-11 23:36:54 UTC) built-in shell (ash)
___ ___ .__________.__
| | |____ |__\_ ____/__|
| | / \| || __) | | (c) 2010-2019
| | | | \ || \ | | Ubiquiti Networks, Inc.
@trilom
trilom / denolove.md
Last active May 22, 2020 04:37
deno + typescript = future ❣️🦕

Investigate

> ifconfig | grep 'inet 19'
        inet 192.168.2.20 netmask 0xffffff00 broadcast 192.168.2.255
        inet 192.168.2.215 netmask 0xffff0000 broadcast 192.168.255.255
        inet 192.168.4.99 netmask 0xffff8000 broadcast 192.168.127.255

Install

```python
import json
import logging
from datetime import date
from datetime import datetime
import boto3
from dynamodb_json import json_util as json_ddb
logger = logging.getLogger('aws.ddb')
@trilom
trilom / loop http(ie)
Created January 29, 2020 16:01
This script can be used/modified to run a command a certain amount of times. this one is developed to run in hex so that you can use the random vars
set +m
from=100000 to=999999
if test "${#from}" -gt "${#to}"; then
format="%0${#from}X"
else
format="%0${#to}X"
fi
from=$(printf '%d' "0x$from") to=$(printf '%d' "0x$to")
pids=()

compress

convert howtogeek.png -quality 95 howtogeek.jpg

resize

convert example.png -resize 200x100 example.png
convert example.png -resize 200 example.png 
convert example.png -resize x200 example.png
@trilom
trilom / readme.md
Last active October 17, 2019 18:02
Shrink/Reduce Docker.raw file below 16 gb on MacOS

Simply open the ~/Library/Group\ Containers/group.com.docker/settings.json config file and set the diskSizeMiB field to your desired size.
Save, and Docker will now limit the size of the Docker.raw.
You might need to restart Docker to resize the Docker.raw.

@trilom
trilom / network_addr_Ohai7.rb
Last active December 9, 2018 19:01 — forked from jtimberman/network_addr.rb
Ohai plugin to provide semantically nice attributes for network interfaces
Ohai.plugin(:NetworkAddrs) do
provides "networkAddrs"
depends "network/interfaces", "hostname"
collect_data(:default) do
networkAddrs(Mash.new)
network[:interfaces].each do |iface, addrs|
addrs[:addresses].each do |ip, params|
networkAddrs["ipaddress_#{iface}"] = ip if params[:family].eql?('inet')
networkAddrs["ipaddress6_#{iface}"] = ip if params[:family].eql?('inet6')
networkAddrs["macaddress_#{iface}"] = ip if params[:family].eql?('lladdr')
###Gist Examples
## Upload clipboard with a file name of "Gist Help" and copy the resulting gist to your clipboard.
gist -c -f "Gist Help" -P
## Do tha same as above, but private.
gist -c -f "Gist Help" -p -P
# Upload a local file with the same gist name.
gist ab.rb
# Do the same with multiple files
gist a b c
gist *.rb