Skip to content

Instantly share code, notes, and snippets.

@todun
todun / brew-upgrade.sh
Created March 16, 2020 11:02 — forked from jwadolowski/brew-upgrade.sh
brew-upgrade.sh
#!/usr/bin/env bash
(set -x; brew update;)
(set -x; brew upgrade;)
(set -x; brew cleanup;)
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
@todun
todun / cask_upgrade.sh
Created March 16, 2020 11:02
Script upgrading outdated brew casks
#!/usr/bin/env bash
(set -x; brew update;)
(set -x; brew cleanup;)
(set -x; brew cask cleanup;)
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
@todun
todun / web-servers.md
Created March 4, 2020 23:31 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@todun
todun / iam-terraform-create-policy.tf
Created March 4, 2020 20:14 — forked from arsdehnel/iam-terraform-create-policy.tf
AWS IAM policies for running Terraform from an EC2 instance.
resource "aws_iam_policy" "terraform_create_policy" {
name = "terraform_create_policy"
path = "/"
policy = "${data.aws_iam_policy_document.terraform_create_policy.json}"
}
data "aws_iam_policy_document" "terraform_create_policy" {
statement {
sid = "1"
actions = [
@todun
todun / vagrant-cheat-sheet.md
Created February 16, 2020 10:33 — forked from wpscholar/vagrant-cheat-sheet.md
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@todun
todun / pwnagotchi notes
Created November 15, 2019 01:51 — forked from GermaniumSystem/pwnagotchi notes
How to set up a pwnagotchi in 25* simple steps.
Preface:
I have no idea if any of this is the "right" way of doing it. This is just how I got my unit working.
Good luck.
WARNING: Do not use a V1 Waveshare display module with a stock pwnagotchi! The pwnagotchi expects a V2 module, and may irreparably damage a V1 module!
A V1 display module *can* work, but you must modify `waveshare.py` and `display.py` beforehand. For the time being, this is left as an exercise for the reader.
If you have already burnt a V1 display, try disconnecting it from the Pi and leaving it overnight. This may rejuvenate the display somewhat, but it will likely still display signs of damage.
Installation:
1. `dd` Raspbian Lite to an SD card.
@todun
todun / README.md
Created October 2, 2019 17:13 — forked from roachhd/README.md
Games on GitHub

Games on GitHub

Below is a list of open source games and game-related projects that can be found on GitHub - old school text adventures, educational games, 8-bit platform games, browser-based games, indie games, GameJam projects, add-ons/maps/hacks/plugins for commercial games, libraries, frameworks, engines, you name it.

Contributing

If you'd like to add a repository to the list, please create an Issue, or fork this repository and submit a pull request.

Help: MarkDown Help, Markdown Cheatsheet

@todun
todun / xholonWorkbook.xml
Created August 15, 2019 00:55 — forked from kenwebb/xholonWorkbook.xml
Google Knowledge Graph
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/wb/ (C) Ken Webb Sat Jun 09 2012 09:22:12 GMT-0400 (EDT)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Google Knowledge Graph
Description:
Url: http://www.google.com/insidesearch/features/search/knowledge.html
@todun
todun / cowzen.py
Created August 3, 2019 08:24 — forked from AgustinLado/cowzen.py
Get a random line from the Zen of Python without a print (preferably for a colorful cow to chant!)
# Get a random line from the Zen of Python without a print (preferably for a colorful cow to chant!)
# Replace stdout by an anonymous class that returns nothing on write()
import sys
stdout = sys.stdout
sys.stdout = type('BlackHole', (), {'write': (lambda self, string: '')})()
# This import's output has now been supressed
import this