| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| const LIM = 41 | |
| var facts [LIM]uint64 |
(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.
by alexander white ©
Hierarchical data metrics that allows fast read operations on tree like structures.
Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.
| // This will open up a prompt for text to send to a console session on digital ocean | |
| // Useful for long passwords | |
| (function () { | |
| var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split(""); | |
| function f() { | |
| var character = t.shift(); | |
| var i=[]; | |
| var code = character.charCodeAt(); | |
| var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1 |
As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.
| # ------------------------------------ | |
| # Docker alias and function | |
| # ------------------------------------ | |
| # Get latest container ID | |
| alias dl="docker ps -l -q" | |
| # Get container process | |
| alias dps="docker ps" |
| function mysite_pending($order_id) { | |
| error_log("$order_id set to PENDING", 0); | |
| } | |
| function mysite_failed($order_id) { | |
| error_log("$order_id set to FAILED", 0); | |
| } | |
| function mysite_hold($order_id) { | |
| error_log("$order_id set to ON HOLD", 0); | |
| } | |
| function mysite_processing($order_id) { |
| git config --global alias.superlog "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all" |