Misc Others
https://git.coolaj86.com/coolaj86/greenlock-express.js
https://gitee.com/lcmoming/awesome-ios
BridgeTalk.prototype.sendSynch = function(timeout) { | |
var self = this; | |
self.onResult = function(res) { | |
this.result = res.body; | |
this.complete = true; | |
} | |
self.complete = false; | |
self.send(); | |
if (timeout) { |
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- note that this is somefile.pom not pom.xml, and may not be the same data as in pom.xml --> | |
<project> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.java-websocket</groupId> | |
<artifactId>Java-WebSocket</artifactId> | |
<packaging>jar</packaging> | |
<name>Java WebSocket</name> | |
<version>1.3.1-SNAPSHOT</version> | |
<description>A barebones WebSocket client and server implementation written in 100% Java</description> |
docker system prune --volumes | |
docker run -u`id -u`:`id -g` -v $(pwd):/user/project -v ~/.aws:/user/.aws -v ~/.npmrc:/user/.npmrc -w /user/project -it --entrypoint /bin/bash circleci/node:12 | |
# get compressed size of docker images (after they're pulled locally) | |
docker save image-name:latest > sizetest.tar | |
gzip sizetest.tar | |
ls -lh sizetest.tar.gz | |
# see https://github.com/docker/docker/issues/1143 |
```bash | |
$ ssh -A vm | |
$ git config --global url."git@github.com:".insteadOf "https://github.com/" | |
$ cat ~/.gitconfig | |
[url "git@github.com:"] | |
insteadOf = https://github.com/ | |
$ go get github.com/private/repo && echo Success! | |
Success! | |
``` |
30.11.2020: Updated with the new patchseries and instructions for Windows
02.12.2020: Added tweaks
08.12.2020: Updated with patchseries v4
31.01.2020: Updated with patchseries v6
get current branch name: git rev-parse --abbrev-ref HEAD
revert commit: git reset --soft HEAD~1
revert add: git reset HEAD $1
pushing after rebase: git push --force-with-lease
Resources: https://makandracards.com/makandra/12107-git-show-current-branch-name-only
shopt -s globstar | |
alias get-checksum='cd $1; find -type f -exec md5sum {} + | tee $2; cd -' | |
function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; } | |
alias speedtest='wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip' | |
alias fixvpn="sudo route -n flush && sudo networksetup -setv4off Wi-Fi && sudo networksetup -setdhcp Wi-Fi" |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
svg { | |
font: 10px sans-serif; | |
} | |
.bar rect { | |
fill: steelblue; | |
shape-rendering: crispEdges; | |
} |
alternate registry to fetch packages outside of go get: https://gopm.io/download?pkgname=golang.org/x/oauth2 | |
alternate web sandbox for go: https://goplay.space/ | |
https://medium.com/@nate510/don-t-use-go-s-default-http-client-4804cb19f779 | |
https://github.com/beyondns/gotips | |
http://moazzam-khan.com/blog/golang-make-http-requests/ |