Skip to content

Instantly share code, notes, and snippets.

View kenshinji's full-sized avatar
🎯
Focusing

Fred Wang kenshinji

🎯
Focusing
View GitHub Profile
@wd
wd / config.json
Last active August 19, 2023 22:23
路由器梅林固件上面使用 v2ray 的方案
{
"log": {
"loglevel": "none"
},
"inbound": {
"port": 23456,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"udp": true
@TimothyYe
TimothyYe / bench.sh
Created October 24, 2017 01:52
Bench test script
#!/usr/bin/env bash
#
# Description: Auto test download & I/O speed script
#
# Copyright (C) 2015 - 2016 Teddysun <i@teddysun.com>
#
# Thanks: LookBack <admin@dwhd.org>
#
# URL: https://teddysun.com/444.html
#
@tzapu
tzapu / docker-compose.yml
Last active September 26, 2022 05:13
docker compose file for local server, plex, transmission, sonarr, radarr, ombi, netdata, nextcloud
version: '2.1'
services:
transmission:
container_name: transmission
image: dperson/transmission
restart: unless-stopped
depends_on:
- plex
network_mode: host
environment:
@mosquito
mosquito / README.md
Last active May 4, 2024 12:42
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@rpaul-stripe
rpaul-stripe / app.js
Last active July 11, 2020 01:40
Stripe Checkout Node.js Express Example
const keyPublishable = process.env.PUBLISHABLE_KEY;
const keySecret = process.env.SECRET_KEY;
const app = require("express")();
const stripe = require("stripe")(keySecret);
app.set("view engine", "pug");
app.use(require("body-parser").urlencoded({extended: false}));
app.get("/", (req, res) =>
@sam-artuso
sam-artuso / setting-up-babel-nodemon.md
Last active November 3, 2023 08:52
Setting up Babel and nodemon

Setting up Babel and nodemon

Inital set-up

Set up project:

mkdir project
cd project
npm init -y
@emenoh
emenoh / NightmareEmulatorTest
Last active December 24, 2018 08:35
NightmareJS screenshots using device emulator
"use strict";
const Nightmare = require('nightmare');
const url = "http://www.apple.com";
//just an example
const path = "./testfile.png";
//we'll save the screenshot in the same directory
const userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10A5376e";
//make sure we load the mobile version
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active January 31, 2024 14:45
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@schnell18
schnell18 / macosx_remove_java9.sh
Created October 8, 2016 13:26
MacOS X remove Java 9
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
@btfak
btfak / useHexo.md
Created May 26, 2016 09:41
How to use Hexo and deploy to GitHub Pages