Skip to content

Instantly share code, notes, and snippets.

@evianzhow
evianzhow / install_nodejs_and_yarn_homebrew.md
Created April 20, 2019 04:22 — forked from nijicha/install_nodejs_and_yarn_homebrew.md
Install NVM, Node.js, Yarn via Homebrew

Install NVM, NodeJS, Yarn via Homebrew

Prerequisites

  • Homebrew should be installed (Command line tools for Xcode are included).

Getting start

Install NVM and NodeJS

  1. Install nvm via Homebrew
@evianzhow
evianzhow / readme.txt
Created May 31, 2016 05:35 — forked from fqrouter/readme.txt
shadowsocks 公共代理的必要设置
good, 你已经有了一个自己的shadowsocks代理了,现在想要把这个代理公布出去给所有人分享。
但是没有两个小时,代理就没法使用了,为什么?因为你需要额外注意以下事项(以下步骤需要比较高的linux技能)
本文只关注于确保shadowsocks服务还“活着”,如果你希望让其跑得更快,请参考
https://github.com/clowwindy/shadowsocks/wiki/Optimizing-Shadowsocks
1、 shadowsocks的timeout设置
超时时间越长,连接被保持得也就越长,导致并发的tcp的连接数也就越多。对于公共代理,这个值应该调整得小一些。推荐60秒。
2、 检查操作系统的各种限制
对于openvz的vps,特别需要检查一下
@evianzhow
evianzhow / debugger.m
Created September 24, 2015 04:22 — forked from onevcat/debugger.m
Check if a debugger attached.
- (BOOL)Debugger{
static BOOL debuggerIsAttached = NO;
static dispatch_once_t debuggerPredicate;
dispatch_once(&debuggerPredicate, ^{
struct kinfo_proc info;
size_t info_size = sizeof(info);
int name[4];
@evianzhow
evianzhow / CalculatorView.swift
Created September 20, 2015 03:42 — forked from natecook1000/CalculatorView.swift
An IBInspectable Calculator Construction Set
// CalculatorView.swift
// as seen in http://nshipster.com/ibinspectable-ibdesignable/
//
// (c) 2015 Nate Cook, licensed under the MIT license
/// The alignment for drawing an String inside a bounding rectangle.
import Foundation
import UIKit
@evianzhow
evianzhow / com.shadowsocks.chinadns.plist
Last active August 29, 2015 14:25 — forked from lexrus/com.shadowsocks.chinadns.plist
LaunchCtl plist for ChinaDNS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.shadowsocks.chinadns</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/chinadns</string>
<string>-c</string>
#!/bin/bash
#cut/join videos using ffmpeg without quality loss
if [ -z $1 ] || [ -z $2 ]; then
echo "Usage:$0 c[ut] seconds <File>"
echo " eg. $0 c 10 80 example.mp4"
echo " eg. $0 c 00:00:10 00:01:20 example.mp4"
echo "Usage:$0 j[oin] <FileType>"
echo " eg. $0 j avi"
exit