Skip to content

Instantly share code, notes, and snippets.

View anhnd3's full-sized avatar

Nguyễn Duy Anh anhnd3

View GitHub Profile
@anhnd3
anhnd3 / polling.go
Last active January 5, 2020 14:11
Interval Function Golang
package main
import (
"fmt"
"time"
"net/http"
)
func doSomething(s string) {
fmt.Println("doing something", s)
@anhnd3
anhnd3 / event_loop.js
Last active August 28, 2020 03:05
Test event loop in javascript
function foo() {
console.log('foo');
}
function bar() {
setTimeout(foo);
console.log('bar');
}
function baz() {
setTimeout(() => console.log('baz'));
}
# Semantic Commit Messages
See how a minor change to your commit message style can make you a better programmer.
Format: `<type>(<scope>): <subject>`
`<scope>` is optional
## Example
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {

Would it be possible to include an iCal file attachment to the Access-A-Ride advance notification emails with a 30 minute window from the specified pickup time (that is the window in which Access-A-Ride drivers need to arrive)?

For example: if my Access-A-Ride is supposed to pick me up at 10:34 am from 1000 Broadway Ave and then again at 8:00 pm from 900 Jay St., include a calendar event (a .ics file) that would look similar to the following, attached to the advance trip notification:

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
SUMMARY:Access-A-Ride Pickup
@anhnd3
anhnd3 / go-ssh.go
Last active August 30, 2021 07:40
Golang ssh connection
package main
import (
"bytes"
"code.google.com/p/go.crypto/ssh"
"fmt"
"io/ioutil"
"os"
)
@anhnd3
anhnd3 / dfs_bfs.js
Last active October 10, 2021 22:04
Depth-First and Breadth-First In JS
function depthFirst(root) {
// initialize the stack with the root node
let stack = [root];
// continue running the algorithm while there are still nodes on the stack
while (stack.length) {
// pop the top node from the stack
let node = stack.pop();
@anhnd3
anhnd3 / ReactNative-vs-Flutter.md
Created February 3, 2023 06:39 — forked from tkrotoff/ReactNative-vs-Flutter.md
ReactNative vs Flutter
package main
import (
"fmt"
"time"
)
func main() {
fmt.Println("Times: ")
t := time.Now()