π
Concurrency is a domain I have wanted to explore for a long time because the locks and the race conditions have always intimidated me. I recall somebody suggesting concurrency patterns in golang because they said "you share the data and not the variables".
Amused by that, I searched for "concurrency in golang" and bumped into this awesome slide by Rob Pike: https://talks.golang.org/2012/waza.slide#1 which does a great job of explaining channels, concurrency patterns and a mini-architecture of load-balancer (also explains the above one-liner).
Let's dig in:
Default behavior dictates the following order for ZSH startup files:
/etc/zshenv~/.zshenv/etc/zprofile(if login shell)~/.zprofile(if login shell)/etc/zshrc(if interactive)~/.zshrc(if interactive)/etc/zlogin(if login shell)~/.zlogin(if login shell)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "net" | |
| "net/http" | |
| "os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (typeof registerPaint === 'function') { | |
| class DotGridWorket { | |
| static get inputProperties() { | |
| return ['--dot-size', '--dot-spacing', '--dot-color']; | |
| } | |
| parseProps(props) { | |
| const dotSize = props.get('--dot-size'); | |
| const dotSpacing = props.get('--dot-spacing'); | |
| const dotColor = props.get('--dot-color'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "basics": { | |
| "name": "Socheat Sok", | |
| "label": "Senior Software Developer", | |
| "picture": "https://avatars.githubusercontent.com/u/4363857?v=4", | |
| "email": "alex@socheat.net", | |
| "website": "https://socheat.dev", | |
| "summary": "I'm a Full-Stack Software Developer. I got my bachelor degree on Management Information System at SETEC Institute. I was previously working at Open Institute, my work focused on inproving User Experience and optimizing website performance using new standard of frontend development by switching the existing code base of using jQuery to using modern JavaScript libraries such as VueJS and Webpack. I also work with the backend team to improve performance of the backend service as well by using standard Eloquent and ORM for handling database transaction instead of using raw SQL queries.", | |
| "location": { | |
| "address": "292 St", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require('fs') | |
| var gradientString = require('gradient-string') | |
| var out = gradientString([ | |
| { color: '#42d392', pos: 0 }, | |
| { color: '#42d392', pos: 0.1 }, | |
| { color: '#647eff', pos: 1 } | |
| ])('Vue.js - The Progressive JavaScript Framework') | |
| var data = out.replace(/\x1B/g, '\\x1B') |