This file contains 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
buf := make([]byte, 4096) | |
for { | |
n, err := gReader.Read(buf) | |
if err != nil { | |
if err == io.EOF { | |
_, err = c.Response().Write(buf[:n]) | |
if err != nil { |
This file contains 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
for { | |
_, err := io.CopyN(c.Response(), gReader, 4096) | |
if err == io.EOF { | |
c.Response().Flush() | |
break | |
} else if err != nil { | |
return err | |
} |
This file contains 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
# Unique history file per shell session. | |
export HISTSIZE=1000 | |
export HISTFILE=~/.bash-history-${ITERM_SESSION_ID} | |
# export HISTFILE=$HOME/.bash_hist_${HOSTNAME/.*/}_$(basename $(tty)) | |
export SAVEHIST=1000 | |
# New - remove if not working properly | |
export HISTCONTROL=ignoreboth | |
# export HISTCONTROL=ignoredups | |
# For iTerm2 to show the directory it's in |
This file contains 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
# ITERM SESSION ID seems to have puctuation in it, replace with slash | |
export SESSION_ID=${ITERM_SESSION_ID//:/-} | |
# Unique history file per shell session. | |
export HISTSIZE=500 | |
# Get only the window/tab indices as ID (w0t0p0) as the Session ID can change | |
# after updates/restarts/etc... | |
export HISTFILE="${HOME}/.bash-history-${SESSION_ID:0:6}" | |
# export HISTFILE="~/bash_history/.bash-history" |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am adrianlungu on github. | |
* I am adrianlungu (https://keybase.io/adrianlungu) on keybase. | |
* I have a public key ASBaYoW_4AgyOvC14u2ZcWkFfiw8isJ4Jxmv59IMmfFaUgo | |
To claim this, I am signing this object: |
This file contains 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
Find: .Prepare\("(.*)" | |
Replace: .PrepareContext("$1" |
This file contains 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 testing | |
import ( | |
"fmt" | |
"github.com/google/go-cmp/cmp" | |
"github.com/onsi/gomega/format" | |
"github.com/onsi/gomega/types" | |
) |
This file contains 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 | |
# | |
# prune_dir - prune directory by deleting files if we are low on space | |
# | |
DIR=$1 | |
CAPACITY_LIMIT=$2 | |
if [ "$DIR" == "" ] | |
then | |
echo "ERROR: directory not specified" |
This file contains 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 | |
cd '/Applications/League of Legends.app/Contents/LoL/' | |
./LeagueClient.app/Contents/MacOS/LeagueClient |
This file contains 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
default 21:27:34.904306+0300 coreaudiod CAReportingClient.mm:480 stopping ( | |
409946038468614 | |
) | |
default 21:27:34.904433+0300 coreaudiod CAReportingClient.mm:508 message { | |
"session_duration" = "13.56053006649017"; | |
}: ( | |
409946038468614 | |
) | |
default 21:27:34.905257+0300 coreaudiod IO Stopped Context 478 after 648192 frames. | |
default 21:27:34.905338+0300 coreaudiod HALS_IOContext_Legacy_Impl::IOThreadEntry: 478 AppleUSBAudioEngine:Focusrite:Scarlett 2i2 USB:1100000:1,2 (AppleUSBAudioEngine:Focusrite:Scarlett 2i2 USB:1100000:1,2): stopping with error 0 |
OlderNewer