Skip to content

Instantly share code, notes, and snippets.

Avatar

pythoninthegrass

View GitHub Profile
@pythoninthegrass
pythoninthegrass / .bashrc
Created Jun 23, 2022
Synology shell config
View .bashrc
#/etc/profile: system-wide .profile file for ash.
umask 077
PATH=/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
export PATH
PGDATA=/var/services/pgsql
export PGDATA
@pythoninthegrass
pythoninthegrass / config.yml
Last active Jul 1, 2022
lazydocker config
View config.yml
# ~/Library/Application Support/jesseduffield/lazydocker/config.yml
gui:
returnImmediately: true
customCommands:
services:
- name: docker-compose
command: docker-compose --env-file=.env up --remove-orphans -d
containers:
- name: bld-meetup
attach: false
@pythoninthegrass
pythoninthegrass / keychron_q1_custom.json
Created Jun 15, 2022
Keychron Q1 Via Config: Solid white backlight, F5 + F11 keys w/o Fn
View keychron_q1_custom.json
{
"name": "Keychron Q1",
"vendorProductId": 875823367,
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
"layers": [
[
"KC_ESC",
"KC_BRID",
"KC_BRIU",
"USER00",
@pythoninthegrass
pythoninthegrass / bootstrap.sh
Last active Jun 4, 2022
Working ubuntu cloud-config used with multipass
View bootstrap.sh
multipass launch -n testvm -mem --cpu 1 --disk 5G --memory 2G 22.04 --cloud-init ~/.config/cloud-init.yml -v
ip_addr=$(multipass info testvm | awk '/IPv4/ {print $NF}')
ssh "ubuntu@${ip_addr}"
@pythoninthegrass
pythoninthegrass / clean_code.md
Created May 24, 2022 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin
View clean_code.md

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@pythoninthegrass
pythoninthegrass / get-oauth2-token-meetup-api
Created May 4, 2022 — forked from valeriocos/get-oauth2-token-meetup-api
Get a bearer/OAuth2 token for Meetup application-only requests in Python3
View get-oauth2-token-meetup-api
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2019 Bitergia
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
@pythoninthegrass
pythoninthegrass / articles.json
Created Apr 17, 2022
Svelte REPL troubleshooting
View articles.json
{"1":{"title":"USFL 2022 season opener, New Jersey Generals at Birmingham Stallions: Live updates, score, TV, streaming info - CBS Sports","url":"https://www.cbssports.com/general/news/usfl-2022-season-opener-new-jersey-generals-at-birmingham-stallions-live-updates-score-tv-streaming-info/live/","source":"CBS Sports"},"2":{"title":"2022 NBA Playoffs - Betting Tips for Saturday's Game 1 matchups - ESPN","url":"https://www.espn.com/chalk/story/_/id/33746620/2022-nba-playoffs-betting-tips-saturday-game-1-matchups","source":"ESPN"},"3":{"title":"Here's what Biden, Harris and their spouses paid in 2021 taxes - CBS News","url":"https://www.cbsnews.com/news/heres-what-the-president-vice-president-and-their-spouses-earned-and-paid-in-taxes-in-2021/","source":"CBS News"},"4":{"title":"Judge rules Musk's tweets over taking Tesla private were false, investors say - Reuters","url":"https://www.reuters.com/business/autos-transportation/judge-rules-musks-tweets-over-taking-tesla-private-were-false-investors-say-2022-04-16/
@pythoninthegrass
pythoninthegrass / nm_scan.py
Created Apr 13, 2022
Ingest CSVs from Cisco Meraki, then filter by IP address, and scan the hosts from the filtered CSV
View nm_scan.py
#!/usr/bin/env python3
import nmap
import pandas as pd
from icecream import ic
from pathlib import Path
# verbose icecream
# ic.configureOutput(includeContext=True)
@pythoninthegrass
pythoninthegrass / config
Created Mar 19, 2022 — forked from miguelmota/config
Arch linux VNC server setup
View config
session=lxqt
geometry=1920x1080
localhost # comment this out to allow connections from anywhere
alwaysshared
View mac_restart_vnc_over_ssh.md