This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# save this file in /etc/default/unicorn_app | |
USER=app_user | |
APP_ROOT=/srv/app | |
RVM_STRING=2.2.4@app_gemset | |
RACK_ENV=production | |
UNICORN_OPTS="-D -c /srv/app/shared/config/unicorn.rb -E production" | |
DAEMON=unicorn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### NOT A SCRIPT, JUST A REFERENCE! | |
# install dante-server | |
sudo apt update | |
sudo apt install dante-server | |
# or download latest dante-server deb for Ubuntu, works for 16.04 and 18.04: | |
wget http://archive.ubuntu.com/ubuntu/pool/universe/d/dante/dante-server_1.4.2+dfsg-2build1_amd64.deb | |
# or older version: | |
wget http://ppa.launchpad.net/dajhorn/dante/ubuntu/pool/main/d/dante/dante-server_1.4.1-1_amd64.deb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ZSH Theme emulating the Fish shell's default prompt. | |
_fishy_collapsed_wd() { | |
echo $(pwd | perl -pe " | |
BEGIN { | |
binmode STDIN, ':encoding(UTF-8)'; | |
binmode STDOUT, ':encoding(UTF-8)'; | |
}; s|^$HOME|~|g; s|/([^/])[^/]*(?=/)|/\$1|g | |
") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Work around for currently not working behavior='height' of KeyboardAvoidingView | |
* Please note that this is just a way around the issue and not an actual fix | |
* Tested on: | |
* - iOS 10.2 (both simulator and actual device): react 16.0.0-alpha.6 & react-native 0.44.2 | |
* @see https://github.com/facebook/react-native/issues/13754 | |
* @see https://stackoverflow.com/questions/41616457/keyboardavoidingview-reset-height-when-keyboard-is-hidden | |
* @see https://github.com/facebook/react-native/blob/master/Libraries/Components/Keyboard/KeyboardAvoidingView.js#L163-L166 | |
* Issues: | |
* - onLayout is not called when the keyboard is dismissed, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.views.Hovercard = Backbone.View.extend({ | |
el: '#hovercard_container', | |
initialize: function() { | |
$(document) | |
.on('mouseenter', '.hovercardable', _.bind(this._mouseenterHandler, this)) | |
.on('mouseleave', '.hovercardable', _.bind(this._mouseleaveHandler, this)); | |
this.show_me = false; |