- the versions between jasmine and karma are kind of wonky. Likely because Jasmine isn't keeping up with the other changes to karma.
- karma or mocha, or something I was using, doesn't like coffee even though processors by default includes coffee.
- PHantomJS really sticks to the 30sec timeout even if all the tests have been run.
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 | |
function godoc_procs() { | |
ps -ef | grep 'godoc -http=:1212' | grep -v grep | cut -f 2 -d ' ' | |
} | |
function launch_godoc() { | |
procs=$(godoc_procs) | |
if [ "$procs" -gt 1 ]; then | |
godoc_procs | xargs kill -9 |
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 lookup | |
import "reflect" | |
type Lookup struct { | |
target interface{} | |
} | |
type Facet struct { | |
Method reflect.Method |
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 | |
function clean() { | |
rm -rf a b c | |
} | |
function _a() { | |
mkdir a | |
} |
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 | |
# Examples of Looping in Bash | |
tools=( git zsh emacs tmux mlocate open-vm-tools ) | |
for r in "${tools[@]}"; do | |
echo $r | |
done |
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
colors = { | |
green: #38ab0b | |
red: #ab130b | |
blue: #099aab | |
} | |
for name, color in colors | |
.btn-{name} | |
background: mix(color, white, 60%) | |
&:hover |
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
type Db struct { | |
db *bolt.DB | |
err error | |
} | |
func (d *Db) start() *bolt.DB { | |
d.db, d.err = bolt.Open("my.db", 0600, nil) | |
if d.err != nil { | |
fmt.Println(d.err) | |
} |
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 IndentLines(indent, code string) string { | |
reader := bufio.NewReader(bytes.NewBufferString(code)) | |
buf := bytes.NewBufferString("") | |
line, prefix, err := reader.ReadLine() | |
for err == nil && line != nil { | |
if !prefix { | |
buf.WriteString(indent) | |
} |
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
matches = [ | |
[ "abc", false ], | |
[ "a\\1d", true ] | |
] | |
re = /\\[0-9]/; | |
for (var i = 0; i < matches.length; i++) { |
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
`rpm -i some-pacakge.rpm` This doesn't downlaod or install all dependencies. Instead that process must be done manually by the user. | |
`yum install some-package` Finds the package and it's dependencies, queries meta-data to determine size, then prompts to install y/n. | |
`/etc/yum.conf` Holds references and values to control yum. Like cachedir and logfile, etc. | |
`/etc/yum.repo.d` Holds conf for various repository descriptions. | |
`yum clean` Cleans out various parts of the locally stored information. | |
`yum makecache` To create the information i your local database for the enabled repos. | |
`yum remove some-package` To remove some-package. | |
`rpm -e some-package` Will also remove some-package. Errors out if package is required dependency of another installed package. | |
`rpm -e --test some-package` Will test to see if the package can be removed. | |
`yum remove some-package` Will walk the dependencies, show which packages will be removed, and prompt y/n. |