Skip to content

Instantly share code, notes, and snippets.

View wastrachan's full-sized avatar

Winston Astrachan wastrachan

View GitHub Profile
@wastrachan
wastrachan / package.json
Created August 31, 2015 20:29
Default NPM package.json with coffee-script and grunt requirements
{
"name": "project-name",
"version": "1.0.0",
"description": "Project Description",
"author": "Winston Astrachan",
"license": "All Rights Reserved",
"private": true,
"devDependencies": {
"coffee-script": "^1.9.3",
"grunt": "^0.4.5",
@wastrachan
wastrachan / Gruntfile.coffee
Last active August 31, 2015 20:32
Coffee & Compass Gruntfile
module.exports = (grunt) ->
grunt.initConfig({
# Load package.json
pkg: grunt.file.readJSON('package.json')
# Compass config
compass:
@wastrachan
wastrachan / common.coffee
Last active June 21, 2017 10:35
JS Routing System (Simplified)
###
JS Routing and Init System
###
if typeof window.MANIFEST is "undefined"
window.MANIFEST =
VIEWS: {}
UTILS: {}
###
@wastrachan
wastrachan / rules.v4
Last active February 17, 2019 18:38
IPTables Base Rules
# Generated by iptables-save v1.6.0
*filter
:INPUT DROP [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m conntrack --ctstate NEW,ESTABLISHED -m tcp --dport 41864 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
@wastrachan
wastrachan / config.yml
Last active May 6, 2019 02:06
F1 FlexGet Config
variables: variables.yml
schedules:
- tasks: '*'
interval:
minutes: 5
templates:
deluge:
deluge:
#! /bin/bash
#
# APT Installed
# Compare currently installed packages with archived package list
#
# (c) Winston Astrachan 2019
ARCHIVE_FILE=/etc/apt/basepackages.txt
/**
* Switchboard LED Flasher
* Created for Teensy 3.2
* Copyright (c) Winston Astrachan 2019
*
* Emulates a telephone switchboard with 8 lights, blinking them
* to simulate incoming calls at psuedo-random intervals.
*/
const int LAMP1 = 9;
@wastrachan
wastrachan / wg0.nmconnection
Last active November 1, 2020 02:46
Wireguard Configuration for NetworkManager
# Wireguard Configuration for NetworkManager
#
# sudo vim /etc/NetworkManager/system-connections/wg0.nmconnection
# sudo chmod 0600 /etc/NetworkManager/system-connections/wg0.nmconnection
# sudo nmcli connection reload
#
[connection]
id=home.rew1red.com
type=wireguard
@wastrachan
wastrachan / django_env.py
Created February 3, 2022 17:18
Django Environment Variables
import os
from django.core.exceptions import ImproperlyConfigured
from distutils.util import strtobool
def get_env(var_name, default=None, is_bool=False, is_int=False, is_float=False, is_list=False, is_required=False):
""" Loads a value from the environment variable <var_name> and returns
that value, optionally explicitly cast as a type.
If the environment variable is not set, return <default>.
@wastrachan
wastrachan / arch.md
Last active September 30, 2022 03:33
Arch utilities and modifications

Arch Linux

Packages

System Packages

  • yay-bin - AUR / Pacman helper
  • downgrade - Pacman package downgrade helper
  • kernel-modules-hook - Prevent kernel mods from breaking on kernel upgrade
  • systemd-boot-pacman-hook - Update systemd entry on systemd-boot upgrade
  • bolt - Utility to manage/trust thunderbolt accessories without udevd rules
  • reflector - Updated mirrorlist