brew install fish
Set it as default macOS shell https://stackoverflow.com/questions/453236/how-to-set-my-default-shell-on-mac/20506404#20506404
Change region of Xiaomi routers to unlock all channel: | |
1. Login to ur router in browser. | |
2. Open a new tab and paste this | |
http://192.168.31.1/cgi-bin/luci/;stok=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/api/xqsystem/set_country_code?country=CN | |
get the stok value from login tab and replace it in new tab and then hit enter. | |
3. Router will reboot automatically and on next login u will see all 5Ghz channel 36~48 and 149~165. |
brew install fish
Set it as default macOS shell https://stackoverflow.com/questions/453236/how-to-set-my-default-shell-on-mac/20506404#20506404
This is a proposal for lightning talk at Reactive Conf. Please 🌟 this gist to push the proposal!
Hi, I am Andy, creator of leakage - the node-powered memory leak testing library.
Instead of manual debugging it provides a structured approach to fix or even prevent memory leaks.
application: some-dummy-app-name # overridden by -A | |
dispatch: | |
# Let's Encrypt ACME challenge service | |
- url: "*/.well-known/acme-challenge/*" | |
module: acme |
#!/bin/bash | |
# You need: curl, jq, and ipcalc to run this. | |
# You should already have cut, sort and uniq if you're on OS X or Linux. | |
RANGES=$(curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq .prefixes | jq '.[] | select(.region=="us-east-1")' | jq 'select(.service=="EC2")' | jq .ip_prefix | cut -d '"' -f 2 | sort | uniq) | |
for range in $RANGES | |
do | |
MIN=$(ipcalc -bn $range | grep "HostMin" | cut -d ':' -f 2) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
#!/usr/bin/env ruby | |
# Requires imagesnap from https://github.com/alexwilliamsca/imagesnap (brew install imagesnap) | |
# To assemble the video use http://www.dayofthenewdan.com/projects/tlassemble | |
file="~/.gitshots/#{Time.now.to_i}.jpg" | |
puts "Taking capture into #{file}!" | |
system "imagesnap -q -w 3 #{file}" | |
exit 0 |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"