This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ | |
name=$1 | |
if [[ -n "$name" ]]; then | |
target="$( date +%s )" | |
encTarget="$name-$target.ala" | |
splitTargetPrefix="$name-$target.ala-" | |
tar -czvf $target $name | |
openssl des -in $target -out $encTarget |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# --- Version history --- | |
# track cpu usage all the time. $1 is logfile name. | |
# --- Version history --- | |
# Usage: cputrack [PID] [filename] | |
# replace [PID] with process ID # | |
# replace [filename] with base file name to use (no extension) | |
filepath=/Users/ialaddin # modify as desired | |
interval=20 # reports per minute | |
timelimit=6000 # how long to run, in seconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set a proxy | |
export HTTP_PROXY= | |
export HTTPS_PROXY=$HTTP_PROXY | |
npm config set proxy $HTTP_PROXY | |
npm config set https.proxy $HTTPS_PROXY | |
npm config set https-proxy $HTTPS_PROXY | |
git config --global http.proxy $HTTP_PROXY | |
git config --global https.proxy $HTTPS_PROXY | |
# unset proxy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin | |
export PATH | |
#================================================= | |
# System Required: CentOS 6+/Debian 6+/Ubuntu 14.04+ | |
# Description: Install the ShadowsocksR server | |
# Version: 2.0.23 | |
# Author: Toyo | |
# Blog: https://doub.io/ss-jc42/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rp = require('request-promise'); | |
var moment = require('moment'); | |
var storesURL = function(localtion){ | |
return 'https://reserve-prime.apple.com/'+localtion+'/zh_'+localtion+'/reserve/iPhoneX/stores.json'; | |
} | |
var availabilityURL = function(localtion){ | |
return 'https://reserve-prime.apple.com/'+localtion+'/zh_'+localtion+'/reserve/iPhoneX/availability.json'; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// PrettyPrint.swift | |
// | |
// Created by Aladdin on 08/10/2017. | |
// Copyright © 2017 Aladdin. All rights reserved. | |
// | |
import Foundation | |
public func prettyprint<T>(_ object: T, _ file: String = #file, _ function: String = #function, _ line: Int = #line) { | |
Swift.print("\(file.lastPathComponent):\(line) - \(function) | \(object)") |
- Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- ShadowsocksX-NG https://github.com/shadowsocks/ShadowsocksX-NG/releases/
- proxychain-ng
brew install proxychains-ng
- iterm http://www.iterm2.com
- wild-cherry https://github.com/mashaal/wild-cherry
- homebrew https://brew.sh
brew install wget,git
brew cask install iina
- oh-my-zsh http://ohmyz.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="UTF-8"> | |
<style> | |
.node circle { | |
fill: #fff; | |
stroke: steelblue; | |
stroke-width: 3px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# © McUsr/MacUser06 2012 | |
on run {input, parameters} | |
set glossaryName to "DictLogger.txt" | |
set AutomatorIcon to (a reference to file ((path to applications folder as text) & "Automator.app:Contents:Resources:Automator.icns")) | |
# checks to see if the current selection contains anything valid | |
considering diacriticals | |
if first character of (input as text) is not in "abcdefghijklmnopqrstuvwxyz" then | |
tell application "System Events" to set appname to name of first process whose frontmost is true | |
using terms from application "Finder" |
NewerOlder