Skip to content

Instantly share code, notes, and snippets.

@squarism
squarism / elk_stack_install.md
Last active October 22, 2023 12:25
Quick Elasticsearch / Kibana / Logstash (ELK stack) Install (for your local mac dev box)

Elasticsearch / Kibana / Logstash Quick Install

Instructions for getting an ELK stack set up quick on Mac. Paths are opinionated. You'll have to infer and change. Sorry mate. 🍰

Install Homebrew if not already. You probably have. If not, you should.

brew install elasticsearch nginx

do yourself a favor and get a better services command than launchctl

@squarism
squarism / linux_ksp.md
Last active September 15, 2023 16:23
Kerbal Space Program Linux Box

Kerbal Space Program on Linux

KSP is delaying the 64-bit windows port for a while, at least past 1.0. The 32-bit Windows KSP version is a bit cramped. You install too many mods and the game will crash. It's hard to work out the balance point. On the KSP forums and on reddit, sometime people suggest switching to Linux. Someone is having problems playing a game and someone basically suggests learning Unix. Then the thread dies.

Linux (even if you've used it for a decade) is hard. Especially getting all the things to work properly. I used three different distros until I got AMD video drivers to work correctly and even now I'm not sure. You can have an easy time installing Linux. Maybe you got lucky on your hardware. Having a bad time in Linux is crazy-pants-party-time. You have to know a lot of commands just to collect information on what is going on.

Try a sprinkle of empathy.

So I wrote down what I did since I'm wiping my Linux partition over and over again. I hope this helps someone. Maybe

@squarism
squarism / linux_dev_box.md
Last active January 11, 2020 22:54
Linux Dev Box

What?

What were the first things I typed when installing Linux Mint (or Ubuntu 14.10) on a workstation? A lot of this isn't going to be useful to you. I'm sorry. I hope there are some nuggets in here.

Also, maybe this is a lol, linux desktop hasn't changed in 10 years. :neckbeard:

Basics

If dev box or server that eventually might have Ruby on it. RVM will probably take care of this for you. But hey. Maybe you aren't doing Ruby or RVM stuff but I bet you'll be doing XML stuff if this is a dev box.

@squarism
squarism / hi_guy.txt
Created April 8, 2015 20:40
Sometimes Things Have Their Own Purpose
Guy at coffee shop. I'm playing with my adafruit goggles, trying to make a part list.
Guy: What's that.
Me: LED Goggles.
Guy: Do they let you see in 3D.
Me: No.
Guy: Do they let you ride your bike at night?
Me: They aren't that bright.
Guy: Do they let you read better.
Me: Actually they sort of blind you.
@squarism
squarism / docker_cheet_sheet.md
Last active August 29, 2015 14:19
Docker Cheat Sheet (wip)

Remove old containers.

docker ps -a | grep 'weeks ago' | awk '{print $1}' | \

xargs --no-run-if-empty docker rm

@squarism
squarism / whitespace.rb
Created June 17, 2015 18:33
Stripping leading whitespace in ruby heredocs
# <<foo doesn't trim leading whitespace. No problem. :cake:
<<EOS
hi
EOS
=> " hi\n"
# I thought the difference between << and <<- was the leading whitespace trimming.
<<-EOS
hi
EOS
@squarism
squarism / postgres.md
Created June 26, 2015 04:35
postgres is pretty sweet

Postgres is pretty awesome

blog post draft

Basics

Get up and running. Install it. I'm sure you know how. But then maybe you are used to mysql>? Where is the database? How do I even start?

  1. sudo -u postgres -i - This is your system account that pg runs as. Switch to it and we'll create a sandbox database.
  2. createuser name - Where "name" is your normal user account you use.
  3. createdb name -O name - Where "name" is your normal user account you use.
@squarism
squarism / go_mysteries.md
Last active April 20, 2018 21:08
Go Mystery

Remaining Mysteries of the Universe and also Go

  • - How do you do YAML style configuration? (viper or HCL)
  • - How do you do seeds.rb? (well, use a migrator but Go is not Rails, Elixir or Rocket or something else)
  • - What is the deal with my packages not being found within the same project? (learn go project structure)
  • - Test capistrano3 with a go project. (not needed, look at goreleaser)
  • - Play with gb.
  • - Get comfortable with GVM. (not needed)
  • - Use godeps in a real project.
@squarism
squarism / boolfail.py
Last active September 21, 2015 23:15 — forked from tlehman/boolfail.py
Redefine true and false in python
# Python boolean fail
# Or how to redefine True and False and win any argument on the internet!
# Love, @tlehman
from unittest import TestCase
class BoolFail(TestCase):
def test_false(self):
True = False
assert True == False
@squarism
squarism / this_is_terrible.md
Last active January 9, 2022 07:39
Best Developer In The World

Probably Best Thing You Can Do Ever™

git init yolo
cd yolo
# setup remote (or not)

alias gyolo='git add . > /dev/null; git commit -a -m "$(curl -s whatthecommit.com/index.txt)" > /dev/null; git push -f origin master > /dev/null'

export PS1='$FG[032]%2~\