You may need to configure a proxy server if you're having trouble cloning
or fetching from a remote repository or getting an error
like unable to access '...' Couldn't resolve host '...'.
Consider something like:
| /* | |
| This example demonstrates how to load SystemJS and use npm deps from scratch in the browser | |
| About SystemJS : https://github.com/systemjs/systemjs | |
| - first loads SystemJS runtime from CDN with a script tag (same as if you add it with a script tag in the html) | |
| - then loads some npm dependencies using SystemJS | |
| - finally use react to add some component to the page | |
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
| <?php | |
| // app/AppKernel.php | |
| use Symfony\Component\Config\Loader\LoaderInterface; | |
| use Symfony\Component\HttpKernel\Kernel; | |
| class AppKernel extends Kernel | |
| { | |
| public function registerBundles() | |
| { |
If you're not familiar: What is fail2ban? fail2ban is an awesome linux service/monitor that scans log files (e.g. auth.log for SSH) for potentially malicious behavior. Once fail2ban is tripped it will ban users for a specified duration by adding rules to Iptables. If you're unfamiliar with fail2ban Chris Fidao has a wonderful (& free!) series about security including setting up fail2ban here.
Recently Laravel released a new feature in 5.1 to throttle authentication attempts by simply adding a trait to your authentication controller. The Laravel throttle trait uses the inputted username, and IP address to throttle attempts. I love seeing this added to a framework out of the box, but what about some of our other apps not built on Laravel? Like a WordPress login? Or even an open API etc.? Ultimately,
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| ) | |
| func gen(done <-chan struct{}, nums ...int) <-chan int { | |
| out := make(chan int) | |
| go func() { |
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "net" | |
| "os" | |
| "strings" |
| package main | |
| import ( | |
| "bufio" | |
| "encoding/csv" | |
| "encoding/json" | |
| "fmt" | |
| "io" | |
| "os" | |
| "path/filepath" |
A running example of the code from:
This gist creates a working example from blog post, and a alternate example using simple worker pool.
TLDR: if you want simple and controlled concurrency use a worker pool.