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 ( | |
"fmt" | |
"sync" | |
) | |
var wg sync.WaitGroup | |
func first(wait <-chan struct{}) { |
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
#!/bin/bash | |
########## | |
# contents | |
########## | |
# contents | |
# notes | |
# script setup | |
# git config files |
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
#!/bin/bash | |
# This script uses the GNU split utility: http://man7.org/linux/man-pages/man1/split.1.html. | |
# You can use it as a bash script or copy the `splitcsv` function into your own bash/zsh... profile. | |
function splitcsv { | |
if [ "$#" -ne 2 ]; then | |
printf "Usage:\n\n splitcsv [filename] [lines] \n" | |
return 1 | |
fi |
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
func fanIn(chans ...<-chan int) chan int { | |
var wg sync.WaitGroup | |
c := make(chan int) | |
// Closure to send values from a channel | |
output := func(ch <-chan int) { | |
for n := range ch { | |
c <- n |
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 ( | |
"encoding/json" | |
"fmt" | |
"log" | |
) | |
type SyntaxError struct { | |
*json.SyntaxError |
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
// Source: https://github.com/eliben/code-for-blog/blob/master/2019/gohttpconcurrency/channel-manager-server.go | |
// | |
// This version of the server protects all shared data within a manager | |
// goroutine that accepts commands using a channel. | |
// | |
// Eli Bendersky [http://eli.thegreenplace.net] | |
// This code is in the public domain. | |
package main | |
import ( |
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
Bank Fees | |
Bank Fees Overdraft | |
Bank Fees ATM | |
Bank Fees Late Payment | |
Bank Fees Fraud Dispute | |
Bank Fees Foreign Transaction | |
Bank Fees Wire Transfer | |
Bank Fees Insufficient Funds | |
Bank Fees Cash Advance | |
Bank Fees Excess Activity |
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
#!/bin/bash | |
wget -E -k -r -p -e robots=off https://some-site.com/docs/ | |
#### Note the following arguments: | |
# -E : converts downloaded HTML filenames to have a ".html" suffix | |
# -k : converts internal links within downloaded files to point to other downloaded files | |
# -r : recursively download by scanning for internal links in pages | |
# -p : download "page requisites", i.e. images, styles, scripts | |
# -e robots=off : ignore robots.txt (because some sites use it to avoid indexing) |
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
#!/bin/bash | |
# ========= SETTING UP A UNIX USER =========== | |
: <<'end_comment' | |
# Create a new unix user | |
adduser zianwar | |
# Add user to sudo group | |
gpasswd -a zianwar sudo |
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
#!/usr/bin/env bash | |
# Path to the bash it configuration | |
export BASH_IT="$HOME/.bash_it" | |
# Lock and Load a custom theme file | |
# location /.bash_it/themes/ | |
export BASH_IT_THEME='minimal' | |
# Don't check mail when opening terminal. |