This file contains 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
// 1. Global import | |
import 'rxjs/operator/map'; | |
// - Generally imports to top-level Object adding methods | |
// -- through prototypical inheritance (mostly) | |
// -- can act on ALL objects and classes | |
// -- can potentially override js internals altogether | |
// -- harder to tree-shake if done incorrectly | |
// 2. Curly import | |
import { Action } from '@ngrx/store'; |
This file contains 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
1.4 Other Helpers of Interest | |
Other form controls worth mentioning are textareas, password fields, hidden fields, search fields, telephone fields, date fields, time fields, color fields, datetime fields, datetime-local fields, month fields, week fields, URL fields, email fields, number fields and range fields: | |
<%= text_area_tag(:message, "Hi, nice site", size: "24x6") %> | |
<%= password_field_tag(:password) %> | |
<%= hidden_field_tag(:parent_id, "5") %> | |
<%= search_field(:user, :name) %> | |
<%= telephone_field(:user, :phone) %> | |
<%= date_field(:user, :born_on) %> | |
<%= datetime_field(:user, :meeting_time) %> |
This file contains 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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
This file contains 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
[uwsgi] | |
chdir = /var/www/django/app | |
module = app.wsgi_staging | |
virtualenv=/var/www/django/env/ | |
env = DJANGO_SETTINGS_MODULE=app.settings.staging | |
socket = /tmp/app.sock | |
master = 1 | |
workers = 2 | |
chmod-socket = 666 | |
auto-procname = 1 |
This file contains 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
upstream django { | |
ip_hash; | |
server unix:/tmp/django.sock; | |
# server unix:/tmp/fastrouter.socket; | |
} | |
server { | |
listen 80; | |
# listen 443 ssl; |
This file contains 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
upstream uwsgi { | |
ip_hash; | |
server 127.0.0.1:40000; | |
} | |
server { | |
listen 80; | |
server_name www.domain.com; | |
root /sites/mysite/; | |
access_log /sites/mysite/log/nginx/access.log; |
This file contains 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
from fabric.api import local | |
import pip | |
def freeze (): | |
local("pip freeze > requirements.txt") | |
local("git add requirements.txt") | |
local("git commit -v") | |
def upgrade (): | |
for dist in pip.get_installed_distributions(): |