Skip to content

Instantly share code, notes, and snippets.

View maxhungry's full-sized avatar
🦆

Max Hung maxhungry

🦆
  • Auckland, New Zealand
  • 01:35 (UTC +13:00)
View GitHub Profile
rm brew's git completion, they are conflicting with zsh
```
[ -e /usr/local/share/zsh/site-functions/git-completion.bash ] && rm /usr/local/share/zsh/site-functions/git-completion.bash
[ -e /usr/local/share/zsh/site-functions/_git ] && rm /usr/local/share/zsh/site-functions/_git
```
@maxhungry
maxhungry / install-watchman.sh
Created April 5, 2019 21:56 — forked from grenade/install-watchman.sh
To install watchman on Fedora 28, these are all the hoops I had to jump through.
# The following packages are needed during `make`
# - openssl-devel so you don't get:
# ContentHash.cpp:13:10: fatal error: openssl/sha.h: No such file or directory
# - redhat-rpm-config so you don't get:
# gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
# - python-devel so you don't get:
# pywatchman/bser.c:31:10: fatal error: Python.h: No such file or directory
sudo dnf install openssl-devel redhat-rpm-config python-devel libtool
# The rest is just instructions from
@maxhungry
maxhungry / ssl_puma.sh
Created March 8, 2017 10:56 — forked from tadast/ssl_puma.sh
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@maxhungry
maxhungry / digital_ocean_setup.md
Last active April 11, 2016 09:58 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions
@maxhungry
maxhungry / .projections.json
Created November 4, 2015 21:34
ember-cli pod projectionist
{
"app/router.js": {
"type": "router",
"template": [
"import Ember from 'ember';",
"",
"export default Ember.Route.extend({",
"});"
]
},
@maxhungry
maxhungry / application.controller.js
Created October 9, 2015 01:27 — forked from frank06/application.controller.js
parent-child-communication
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@maxhungry
maxhungry / components.my-component.js
Last active August 29, 2015 14:27
component loads differnet template
import Ember from 'ember';
export default Ember.Component.extend({
layoutName: 'components/my-temp1'
});
<RoutingRules>
<RoutingRule>
<Condition>
<HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals >
</Condition>
<Redirect>
<HostName>le-domain.com</HostName>
<ReplaceKeyPrefixWith>#/</ReplaceKeyPrefixWith>
</Redirect>
</RoutingRule>