Copy in a separated package called mongoutil the content of the .go file, then use it as follows
import (
"path/of/mongoutil"
)
type example struct {| local spaces = require("hs.spaces") -- https://github.com/asmagill/hs._asm.spaces | |
| -- Switch kitty | |
| hs.hotkey.bind({'command'}, 'escape', function () -- change your own hotkey combo here, available keys could be found here:https://www.hammerspoon.org/docs/hs.hotkey.html#bind | |
| local BUNDLE_ID = 'net.kovidgoyal.kitty' -- more accurate to avoid mismatching on browser titles | |
| function getMainWindow(app) | |
| -- get main window from app | |
| local win = nil | |
| while win == nil do |
| #!/bin/bash | |
| ### | |
| ### my-script — does one thing well | |
| ### | |
| ### Usage: | |
| ### my-script <input> <output> | |
| ### | |
| ### Options: | |
| ### <input> Input file to read. | |
| ### <output> Output file to write. Use '-' for stdout. |
| #!/bin/sh | |
| HOST_PORT=30022 | |
| DRYRUN= | |
| if [ "$1" = "-n" ] ; then | |
| DRYRUN=true | |
| shift | |
| fi | |
| TARGET=$1 |
| // Simple groupcache example: https://github.com/golang/groupcache | |
| // Running 3 instances: | |
| // go run groupcache.go -addr=:8080 -pool=http://127.0.0.1:8080,http://127.0.0.1:8081,http://127.0.0.1:8082 | |
| // go run groupcache.go -addr=:8081 -pool=http://127.0.0.1:8081,http://127.0.0.1:8080,http://127.0.0.1:8082 | |
| // go run groupcache.go -addr=:8082 -pool=http://127.0.0.1:8082,http://127.0.0.1:8080,http://127.0.0.1:8081 | |
| // Testing: | |
| // curl localhost:8080/color?name=red | |
| package main | |
| import ( |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
These are all the JSConf 2014 slides, codes, and notes I was able to cull together from twitter. Thanks to the speakers who posted them and thanks to @chantastic for posting his wonderful notes.