One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| function transfer | |
| if test (count $argv) -eq 0 | |
| echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md" | |
| return 1 | |
| end | |
| ## get temporarily filename, output is written to this file show progress can be showed | |
| set tmpfile ( mktemp -t transferXXX ) | |
| ## upload stdin or file |
| /* | |
| ******************************************************************************** | |
| Golang - Asterisk and Ampersand Cheatsheet | |
| ******************************************************************************** | |
| Also available at: https://play.golang.org/p/lNpnS9j1ma | |
| Allowed: | |
| -------- | |
| p := Person{"Steve", 28} stores the value |
| # This is just a cheat sheet: | |
| # On production | |
| sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
| # On local | |
| scp -C production:~/database.sql.gz | |
| dropdb database && createdb database | |
| gunzip < database.sql.gz | psql database |
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
| On server-side | |
| -------------- | |
| sTunnel configured like so: | |
| cert = /etc/stunnel/stunnel.pem | |
| [ssh] | |
| accept = 443 | |
| connect = 127.0.0.1:22 | |
| func ComputeHmac256(message string, secret string) string { | |
| key := []byte(secret) | |
| h := hmac.New(sha256.New, key) | |
| h.Write([]byte(message)) | |
| return base64.StdEncoding.EncodeToString(h.Sum(nil)) | |
| } |
| # List of English and Spanish Obscenities for Moderation | |
| 'anus', | |
| 'apestoso', | |
| 'arrogante', | |
| 'arrombado', | |
| 'arse', | |
| 'arsehole', | |
| 'ass', | |
| 'ass-hat', |
| # post a message to discord api via a bot | |
| # bot must be added to the server and have write access to the channel | |
| # you may need to connect with a websocket the first time you run the bot | |
| # use a library like discord.py to do so | |
| import requests | |
| import json | |
| channelID = "your_id_goes_here" # enable dev mode on discord, right-click on the channel, copy ID | |
| botToken = "your_token_here" # get from the bot page. must be a bot, not a discord app |
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "net" | |
| "net/http" | |
| "net/url" | |
| "crypto/tls" |