Skip to content

Instantly share code, notes, and snippets.

View weblogix's full-sized avatar

Randy weblogix

View GitHub Profile
@weblogix
weblogix / guest_wifi.sh
Last active July 29, 2023 12:35
[openwrt cheatsheet]
# Sources
# https://openwrt.org/docs/guide-user/network/wifi/guestwifi/guest-wlan
# https://openwrt.org/docs/guide-user/network/wifi/guestwifi/extras
WIFI_DEV="radio0"
WIFI_PASSWORD="guest"
# Configure network
uci -q delete network.guest
uci set network.guest="interface"
@weblogix
weblogix / general-apps.md
Last active June 2, 2023 02:16
[Mac Apps] Essential Mac applications #spotify #apps

Essential Mac applications

Email

  • Mailspring - Productivity focused & cross-platform email client

Organization

  • bitwarden - Open-source cross-platform password manager

Music/Sound

  • eqMac2 - system-wide audio equalizer
@weblogix
weblogix / Readynas.md
Last active August 14, 2021 02:46
[qBitorrent stop/start linux commandline]
#!/bin/bash

ROUTER_CHECK_HOSTNAME="mooo.com"
NAS_IP=$(curl ifconfig.me)
ROUTER_IP=$(getent hosts ${ROUTER_CHECK_HOSTNAME} | awk '{ print $1 }')
QBITTORRENT_STATUS=$(systemctl status fvapp-qbittorrentr6 | grep 'Active:')

if [[ "$QBITTORRENT_STATUS" =~ .*"active (running)".* && $NAS_IP == $ROUTER_IP ]]; then
 # Kill torrents
@weblogix
weblogix / drevo-caliber.json
Last active May 2, 2021 14:46
[Karabiner-Elements] for DREVO Calibur 71-key Keyboard #mac #keyboard #karabiner
{
"title": "DREVO Calibur 71-key Keyboard",
"rules": [
{
"description": "Set ESC to grave_accent_and_tilde",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "escape",
@weblogix
weblogix / gif_to_mp4.md
Created October 3, 2020 01:34
[ffmpeg snippets] #ffmpeg

ffmpeg -r 30 -i input.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" output.mp4

Here -r 30'' specify the frame rate 30 frames/sec. So if you want 10 sec movie with frame rate 30/sec, you make GIF animation that has total 300 frames, then use -r 30''.

@weblogix
weblogix / Configuration.md
Last active September 28, 2020 01:56
[Ubuntu Installation notes] #ubuntu #linux

Mac-like keys

Gnome-tweak-tool

  • Keyboard & Mouse -> Ctrl Position -> Swap Left Win and Left Ctrl
@weblogix
weblogix / multiple_conditionals.md
Created September 16, 2020 05:57
[React snippets] #react
@weblogix
weblogix / webpack.md
Created September 3, 2020 06:26
[webpack] cheatsheeet

View all webpack processes

ps aux | grep webpack

Kill a single webepack process

kill -9 <process id>
@weblogix
weblogix / .gitconfig
Last active August 19, 2020 06:20
[git cheatsheet] #git
[user]
name = Randy
email = randy@weblogix.ca
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
@weblogix
weblogix / snippet.md
Created March 31, 2020 15:39
[rsync] rsync, without ssh, rsync daemon
export RSYNC_PASSWORD="BACKUP_PASSWORD_GOES_HERE" rsync -av --delete /var/backups/ rsync://backup@192.168.1.1:/backup/