start new:
tmux
start new with session name:
tmux new -s myname
# Config for Nginx to act as a front-end for Riak | |
# The main goal is to proxy all GETs directly to Riak, and disallow anything else (POST, PUT, etc) | |
# Also, disallow use of the map/reduce query links (i.e. /riak/bucket/key/_,_,_) | |
# Config is in /etc/nginx/sites-available/default or somewhere like that | |
# Set up load-balancing to send requests to all nodes in the Riak cluster | |
# Replace these IPs/ports with the locations of your Riak nodes | |
upstream riak_hosts { | |
server 127.0.0.1:8098; |
#verify drive is seen by system | |
cat /proc/scsi/scsi | |
#determine which device it is | |
dmesg | grep sd | |
#mount | |
mount /dev/sdc1 /mnt/usb | |
#or to be extra safe |
/* | |
* System Versioning Preprocessor Macros | |
*/ | |
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) | |
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) | |
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) |
Dear soon-to-be-former user, | |
We've got some fantastic news! Well, it's great news for us anyway. You, on | |
the other hand, are fucked. | |
We've just been acquired by: | |
# Hash keyed by y to speed to_s | |
def to_h | |
hash_with_default = Hash.new {|hash,key| hash[key] = []} | |
@points.inject(hash_with_default) { |hash, point| h[point.y] << point.x; hash } | |
end |
# IEx.configure colors: [enabled: true] | |
# IEx.configure colors: [ eval_result: [ :cyan, :bright ] ] | |
IO.puts IO.ANSI.red_background() <> IO.ANSI.white() <> " ❄❄❄ Good Luck with Elixir ❄❄❄ " <> IO.ANSI.reset | |
Application.put_env(:elixir, :ansi_enabled, true) | |
IEx.configure( | |
colors: [ | |
eval_result: [:green, :bright] , | |
eval_error: [[:red,:bright,"Bug Bug ..!!"]], | |
eval_info: [:yellow, :bright ], | |
], |
const Hooks = { ViewportResizeHooks} | |
const connectLiveSocket = () => { | |
const csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute('content') | |
const liveSocket = new LiveSocket('/my_app/live', Socket, { | |
params: { | |
_csrf_token: csrfToken, | |
viewport: { | |
width: window.innerWidth, | |
height: window.innerHeight |