To pupils: all binaries can be downloaded http://pan.baidu.com/s/1ntCChyp
After overwriting, maybe need to run chmod +x /path/to/sublime_text
. For linux default installation, need to add sudo
.
For programmers:
#!/usr/bin/env zsh | |
local LAMBDA="%(?,%{$fg_bold[green]%}λ,%{$fg_bold[red]%}λ)" | |
if [[ "$USER" == "root" ]]; then USERCOLOR="red"; else USERCOLOR="yellow"; fi | |
# Git sometimes goes into a detached head state. git_prompt_info doesn't | |
# return anything in this case. So wrap it in another function and check | |
# for an empty string. | |
function check_git_prompt_info() { | |
if git rev-parse --git-dir > /dev/null 2>&1; then |
To pupils: all binaries can be downloaded http://pan.baidu.com/s/1ntCChyp
After overwriting, maybe need to run chmod +x /path/to/sublime_text
. For linux default installation, need to add sudo
.
For programmers:
# This requires tmux 2.1. a lot of these settings will error on anything earlier. | |
# Act like Vim; use h,j,k,l to select panes and move the cursor | |
set-window-option -g mode-keys vi | |
bind-key h select-pane -L | |
bind-key j select-pane -D | |
bind-key k select-pane -U | |
bind-key l select-pane -R | |
# Look good |
#! /bin/sh | |
# ================================================================== | |
# ______ __ _____ | |
# /_ __/___ ____ ___ _________ _/ /_ /__ / | |
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / / | |
# / / / /_/ / / / / / / /__/ /_/ / /_ / / | |
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/ | |
# Multi-instance Apache Tomcat installation with a focus | |
# on best-practices as defined by Apache, SpringSource, and MuleSoft |
#!/usr/bin/python | |
# Adapted from http://kutuma.blogspot.com/2007/08/sending-emails-via-gmail-with-python.html | |
import getpass | |
import smtplib | |
from email.MIMEMultipart import MIMEMultipart | |
from email.MIMEBase import MIMEBase | |
from email.MIMEText import MIMEText | |
from email import Encoders | |
import os |
1. Backup any databases you have using mysqldump | |
2. Stop MySQL using the pref panel | |
3. Open Terminal and type in the following commands | |
4. sudo rm /usr/local/mysql | |
5. sudo rm -rf /usr/local/mysql* | |
6. sudo rm -rf /Library/StartupItems/MySQLCOM | |
7. sudo rm -rf /Library/PreferencePanes/My* | |
8. edit /etc/hostconfig and remove the line MYSQLCOM=-YES- (May not be necessary) | |
9. rm -rf ~/Library/PreferencePanes/My* | |
10. sudo rm -rf /Library/Receipts/mysql* |
# encoding: utf8 | |
# 什么是lambda函数?它有什么好处?另外python在函数式编程方面提供了些什么函数和语法? | |
# - lambda 就是匿名函数 | |
# - 好处: 可以动态生成一个函数对象,不用给这个对象命名,污染名字空间 | |
# - 函数:map()/filter() | |
# - 语法:可以函数内部定义函数,闭包支持 | |
# 详细说说tuple、list、dict的用法,它们的特点; | |
# - tuple 固定长度的子项不可变的顺序型容器,一般用来做常量(策划配表)或者表示少量属性的对象(比如pos)表示 |
# 规则配置仅供参考,适用于 Surge Mac (1.2.0) 及其后续版本; | |
# 包含 Proxy Group、URL Rewrite 特性; | |
# 包含 Reject 规则,用于拦截广告、行为分析、数据统计; | |
# 屏蔽 Hao123、百度搜索,放行百度地图、百度外卖、百度音乐、百度云盘、百度百科。 | |
# Surge for Mac 简明指南 http://bit.ly/1TATRaG | |
[General] | |
# warning, notify, info, verbose | |
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local | |
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114 |
""" | |
The MIT License (MIT) | |
Copyright (c) 2015 Mat Leonard | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
#!/bin/bash | |
# update_gfwlist.sh | |
# Author : VincentSit | |
# Copyright (c) http://xuexuefeng.com | |
# | |
# Example usage | |
# | |
# ./whatever-you-name-this.sh | |
# | |
# Task Scheduling (Optional) |