... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
%Plug.Conn{ | |
adapter: {Plug.Adapters.Cowboy.Conn, :...}, | |
assigns: %{ | |
my_assigns: "here" | |
}, | |
before_send: [ | |
#Function<7.125546534/1 in Phoenix.Controller.fetch_flash/2>, | |
#Function<1.127904613/1 in Plug.Session.before_send/2>, | |
#Function<1.43511252/1 in Plug.Logger.call/2>, | |
#Function<0.70322810/1 in Phoenix.LiveReloader.before_send_inject_reloader/1> |
# On the phoenix node | |
# if production mode | |
MIX_ENV=prod PORT=4001 elixir --name phoenix@127.0.0.1 --cookie 123 --erl "-kernel inet_dist_listen_min 9001 inet_dist_listen_m 9001" -pa _build/prod/consolidated -S mix phoenix.server | |
# if debug mode | |
elixir --name phoenix@127.0.0.1 --cookie 123 --erl "-kernel inet_dist_listen_min 9001 inet_dist_listen_m 9001" -S mix phoenix.server | |
# On the observing node | |
# Terminal 1, start SSH tunnel | |
ssh -N -L 9001:localhost:9001 -L 4369:localhost:4369 pi@192.168.1.31 |
defmodule HttpRequester do | |
use GenServer | |
def start_link(_) do | |
GenServer.start_link(__MODULE__, nil, []) | |
end | |
def fetch(server, url) do | |
# Don't use cast: http://blog.elixirsips.com/2014/07/16/errata-dont-use-cast-in-a-poolboy-transaction/ | |
timeout_ms = 10_000 |
#!/bin/sh | |
# | |
# Query a property from the terminal, e.g. background color. | |
# | |
# XTerm Operating System Commands | |
# "ESC ] Ps;Pt ST" | |
oldstty=$(stty -g) | |
# What to query? |
Your monthly notice to go through and disconnect unused applications across various services. | |
Twitter: https://twitter.com/settings/applications | |
Dropbox: https://www.dropbox.com/account/connected_apps | |
Facebook: https://www.facebook.com/settings?tab=applications | |
Google Apps: https://security.google.com/settings/security/permissions?pli=1 | |
Google Ads: http://www.google.com/ads/preferences | |
Google Account: https://security.google.com/settings/security/secureaccount | |
Foursquare: https://foursquare.com/settings/connections | |
Instagram: https://instagram.com/accounts/manage_access |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
sass-convert -R ./ -F sass -T scss && rm *.sass |
- name: Install wget package (Debian based) | |
action: apt pkg='wget' state=installed | |
only_if: "'$ansible_pkg_mgr' == 'apt'" | |
- name: Install wget package (RedHat based) | |
action: yum name='wget' state=installed | |
only_if: "'$ansible_pkg_mgr' == 'yum'" |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!