Skip to content

Instantly share code, notes, and snippets.

git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@eduwass
eduwass / setup.sh
Last active January 3, 2020 18:27
Flynn Install : Single node ( for Ubuntu 14.04 x64 @ DigitalOcean droplet )
#!/bin/bash
# This script will automatically set up a single node Flynn Cluster on your linux box
# Fresh Flynn install with domain provided by the xip.io service
# Tested with Base Image: Ubuntu 14.04 x64 @ DigitalOcean droplet
# @date 16 Nov 2015
# @author Edu Wass (eduwass at gmail com)
echo '---- START SETUP ----'
@rgl
rgl / ss.go
Last active November 3, 2024 20:24 — forked from mitchellh/ss.go
take a screenshot of a specific Windows application window in pure Go
// +build windows
package screen
import (
"fmt"
"image"
"reflect"
"syscall"
"unsafe"
@techgaun
techgaun / readme.md
Created February 5, 2017 04:44
OpenSSH 7.4 on Ubuntu 16.04

Installing OpenSSH 7.4 on Ubuntu 16.04

sudo apt install -y build-essential libssl-dev zlib1g-dev
wget "http://mirrors.evowise.com/pub/OpenBSD/OpenSSH/portable/openssh-7.4p1.tar.gz"
tar xfz openssh-7.4p1.tar.gz
cd openssh-7.4p1
./configure
make
sudo make install
@staaldraad
staaldraad / webdavserv.go
Last active June 18, 2024 14:34
A small webdav server in go
package main
import (
"flag"
"fmt"
"log"
"net/http"
"os"
"golang.org/x/net/webdav"
@s-lyn
s-lyn / MANUAL.md
Created September 15, 2017 10:27
Deploy nodejs app with gitlab.com and pm2

Deploy nodejs app with gitlab.com and pm2

This manual is about setting up an automatic deploy workflow using nodejs, PM2, nginx and GitLab CI. It is tested on:

  • Target server: Ubuntu 16.04 x64. This is suitable for Ubuntu 14.x.
  • Windows 10 on my PC to work.
@dcode
dcode / README.md
Last active August 5, 2024 05:30
How to use CoreDNS w/ etcd backend

Setup CoreDNS w/ etcd backend

Why CoreDNS

[CoreDNS][coredns] was designed from the ground up to provide robust, plugin-based DNS server for use in cloud environments. Namely, it serves as the default primary service discovery mechanism for Kubernetes.

Using CoreDNS allows us to have a lightweight DNS server on RockNSM (11 Mb binary is all that's needed!) to facilitate multi-node service discovery. Alternatively, if another existing DNS service is available, this can be used instead. Aligning with the way the Kubernetes manages service discovery also allows us to build new RockNSM features in parallel with the coming Kubernetes support.

RockNSM Application

@undoZen
undoZen / production.js
Created March 27, 2019 05:49
Taro webpack h5 build hash all assets
module.exports = {
h5: {
miniCssExtractPluginOption: {
filename: 'css/[name].[hash].css',
chunkFilename: 'css/[id].[chunkhash].css'
},
enableDll: false,
webpackChain(chain, webpack) {
const hashRule = (type) => {
chain.module.rules.get(type).uses.get("urlLoader").get("options").name =
@atomicink
atomicink / wenku8.txt
Created February 16, 2020 09:58
轻小说文库txt下载
全本下载
http://dl.wenku8.com/down.php?type=utf8&id=书号&fname=书名
type: txt/utf8/big5
分卷下载
http://dl.wenku8.com/packtxt.php?aid=书号&vid=卷号&aname=书名&vname=卷名&charset=utf-8
aid: 本书编号
vid: 本卷第1章编号-1
aname: 书名
vname: 卷名
@NULLx76
NULLx76 / openssl.sh
Created September 15, 2020 22:37
OpenSSL generate ed25519 and RSA
# Generate ed25519 privkey
openssl genpkey -algorithm ed25519 -out privkey.pem
# export its pubkey
openssl pkey -in privkey.pem -pubout -out pubkey.pem
# Generate RSA privkey
openssl genrsa -des3 -out private.pem 2048
# export its pubkey
openssl rsa -in private.pem -outform PEM -pubout -out public.pem