Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| package main | |
| import ( | |
| "log" | |
| "io" | |
| "os" | |
| "crypto/tls" | |
| "strings" | |
| "net" | |
| "flag" |
| $ go run client.go | |
| 2012/03/28 22:30:21 client: connected to: 127.0.0.1:8000 | |
| Client: Server public key is: | |
| [48 129 159 48 13 6 9 42 134 72 134 247 13 1 1 1 5 0 3 129 141 0 48 129 137 2 129 129 0 188 73 207 11 137 150 106 118 45 27 12 18 76 183 252 31 22 193 109 43 118 130 188 244 197 136 26 55 239 51 225 67 171 20 87 35 107 190 16 158 181 84 225 159 112 70 131 173 136 181 130 151 156 4 142 141 218 100 116 219 228 211 136 155 179 220 50 21 181 134 211 72 22 38 226 51 170 165 39 65 231 3 15 26 54 193 142 242 28 66 96 88 138 237 217 65 144 89 231 177 179 200 116 30 45 148 174 56 57 244 29 17 8 22 86 54 215 14 207 55 223 164 216 184 21 46 29 233 2 3 1 0 1] <nil> | |
| 2012/03/28 22:30:21 client: handshake: true | |
| 2012/03/28 22:30:21 client: mutual: true | |
| 2012/03/28 22:30:21 client: wrote "Hello\n" (6 bytes) | |
| 2012/03/28 22:30:21 client: read "Hello\n" (6 bytes) | |
| 2012/03/28 22:30:21 client: exiting | |
| $ |
| # APISTATUS | |
| # Purpose goes here | |
| # Key goes here (tested, experimental, nonfunctional, and most importantly the equivalent Go abstracted structs/funcs/go routines/jargon jargon which | |
| # provide the functionality | |
| Account: | |
| POST /api/clear_sessions | |
| POST /api/delete_user | |
| GET /api/me.json |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
| #!/bin/bash -eu | |
| tmpdir=$(mktemp -d) | |
| repodir=$(pwd) | |
| # first try to extract parts from the remote | |
| # e.g. github.com/foo/bar/baz | |
| # -> remote = github.com | |
| remote=$(git ls-remote --get-url origin|awk -F ':' '{print $1}'|awk -F '@' ' {print $2}') | |
| # -> path = foo/bar/baz |
| Dir.glob("#{ENV['HOME']}/Library/Application Support/Viscosity/OpenVPN/*/config.conf").each do |file| | |
| certificate_files = ['ca', 'cert', 'key', 'tls-auth'] | |
| config_dir = File.dirname(file) | |
| connection_name = nil | |
| new_config = [] | |
| File.read(file).lines.each do |line| | |
| line.strip! | |
| if line.start_with?('#viscosity name') |
| SELECT blocked_locks.pid AS blocked_pid, | |
| blocked_activity.usename AS blocked_user, | |
| now() - blocked_activity.query_start | |
| AS blocked_duration, | |
| blocking_locks.pid AS blocking_pid, | |
| blocking_activity.usename AS blocking_user, | |
| now() - blocking_activity.query_start | |
| AS blocking_duration, | |
| blocked_activity.query AS blocked_statement, | |
| blocking_activity.query AS blocking_statement |
| ### | |
| ### | |
| ### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
| ### https://christitus.com/windows-tool/ | |
| ### https://github.com/ChrisTitusTech/winutil | |
| ### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
| ### iwr -useb https://christitus.com/win | iex | |
| ### | |
| ### OR take a look at | |
| ### https://github.com/HotCakeX/Harden-Windows-Security |
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
screen -AmdS docker ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
screen -r docker
# enter, then disconnect with Ctrl-a d
screen -S docker -p 0 -X stuff $(printf root\\r\\n)
screen -r docker