Skip to content

Instantly share code, notes, and snippets.

View wildlyinaccurate's full-sized avatar
🐕‍🦺

Joseph Wynn wildlyinaccurate

🐕‍🦺
View GitHub Profile
@Integralist
Integralist / 1. Designing Systems and Applications.md
Last active June 7, 2020 15:22
Designing Systems and Applications

Designing Systems and Applications

This is a short document of tips and notes I've accumulated while learning more about designing distributed systems and building concurrent applications. It is by no means definitive and merely scratches the surface of what is needed to be considered when designing an architecture expected to handle large scale traffic.

Distributed Systems

Scale out, not up

There reaches a point in your application's design where by merely throwing more hardware at the problem (i.e. "scaling up") will fail to resolve the scalability issues you're encountering.

@phaedryx
phaedryx / summary
Last active December 3, 2022 19:27
Loyalty and Layoffs by David Brady
Original text here: https://whydavewhy.com/2013/08/16/loyalty-and-layoffs/
[root@arkos ~]# cat /etc/systemd/system/mopidy.service
[Unit]
Description=Mopidy
After=network.target
[Service]
ExecStart=/usr/bin/mopidy --config=/etc/mopidy.conf
[Install]
WantedBy=multi-user.target
@wildlyinaccurate
wildlyinaccurate / hack.sh
Last active December 17, 2015 02:49 — forked from erikh/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://gist.githubusercontent.com/wildlyinaccurate/5539084/raw/hack.sh | sh
#
@wildlyinaccurate
wildlyinaccurate / convert-tabs-and-trim-trailing-whitespace.sh
Last active December 11, 2015 22:59
Convert tabs to 4 spaces and trim any trailing whitespace
# This requires GNU sed (or any sed which supports -i) and expand
find . -type f -printf "sed -i 's/[ \t]*$//' %p && expand -t 4 %p > %p.tmp && mv %p.tmp %p\n" | sh
# It's better to be more specific about which files you want to run the replacement in, e.g.
find . -type f -name *.php -printf "sed -i 's/[ \t]*$//' %p && expand -t 4 %p > %p.tmp && mv %p.tmp %p\n" | sh
# You can use find's -regex option to match multiple extensions (you need to double-escape backslashes in bash):
find . -type f -regex .+\\\.\\\(php\\\|css\\\|js\\\)\$ -printf "sed -i 's/[ \t]*$//' %p && expand -t 4 %p > %p.tmp && mv %p.tmp %p\n" | sh
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@jbgo
jbgo / git-recover-branch.md
Last active March 29, 2024 05:04
How to recover a git branch you accidentally deleted

UPDATE: A better way! (August 2015)

As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!

 $ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring