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 February 9, 2024 20:15 — 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.
@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: 卷名
@bluwy
bluwy / sequence.js
Last active March 29, 2022 03:42
Run Svelte preprocessors in the sequence they are declared
import { preprocess } from 'svelte/compiler'
/**
* @typedef {import("svelte/types/compiler/preprocess").PreprocessorGroup} PreprocessorGroup
* @param {PreprocessorGroup[]} preprocessors
* @returns {PreprocessorGroup[]}
*/
export function sequence(preprocessors) {
return preprocessors.map((preprocessor) => ({
markup({ content, filename }) {