Function | Shortcut |
---|---|
New Tab | ⌘ + T |
Close Tab or Window | ⌘ + W (same as many mac apps) |
Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
Cycle iTerm Windows | ⌘ + backtick (true of all mac apps and works with desktops/mission control) |
This file contains 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
using System; | |
using System.Configuration; | |
using System.Threading; | |
using System.Collections; | |
using System.Collections.Generic; | |
namespace HelloDI | |
{ | |
public class MainClass | |
{ |
This file contains 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
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't overwrite GNU Midnight Commander's setting of 'ignorespace'. | |
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups | |
# ... or force ignoredups and ignorespace | |
export HISTCONTROL=ignoreboth |
This file contains 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
IF NOT EXISTS | |
( | |
SELECT * FROM [information_schema].[columns] | |
WHERE table_name = 'Customer' | |
AND table_schema = 'dbo' | |
AND column_name = 'FavoriteColorId' | |
) | |
BEGIN | |
ALTER TABLE [dbo].[Customer] | |
ADD FavoriteColorId int |
This file contains 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
# Environment | |
# | |
# export HOSTNAME=... | |
# export CLUSTER=... | |
# export RACK=... | |
# export ESDIR= | |
# export AWS_ACCESS_KEY=... | |
# export AWS_SECRET_KEY=... | |
# Packages |
This file contains 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
# Configuration file for runtime kernel parameters. | |
# See sysctl.conf(5) for more information. | |
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for | |
# an explanation about some of these parameters, and instructions for | |
# a few other tweaks outside this file. | |
# | |
# See also: https://gist.github.com/kgriffs/4027835 | |
# | |
# Assumes a beefy machine with lots of network bandwidth |
This file contains 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/sh | |
# | |
# 此脚本只允许运行一次 | |
# | |
echo 'vm.overcommit_memory=1' >> /etc/sysctl.conf | |
echo 'vm.min_free_kbytes=5000000' >> /etc/sysctl.conf | |
echo 'vm.drop_caches=1' >> /etc/sysctl.conf | |
echo 'vm.zone_reclaim_mode=0' >> /etc/sysctl.conf |
This file contains 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
## Place this file in "/etc/sysctl.d/network-tuning.conf" and | |
## run "sysctl -p" to have the kernel pick the new settings up | |
# Avoid a smurf attack | |
net.ipv4.icmp_echo_ignore_broadcasts = 1 | |
# Turn on protection for bad icmp error messages | |
net.ipv4.icmp_ignore_bogus_error_responses = 1 | |
# Turn on syncookies for SYN flood attack protection |
This file contains 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
#def 60 | |
net.ipv4.tcp_fin_timeout=20 | |
#def 9 | |
net.ipv4.tcp_keepalive_probes=5 | |
#def 32768 | |
net.ipv4.tcp_max_orphans=32768 | |
#def 10240 | |
net.core.optmem_max=20480 | |
#def 110592 | |
net.core.rmem_default=16777216 |
This file contains 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
# http://raspberrypi.stackexchange.com/questions/169/how-can-i-extend-the-life-of-my-sd-card | |
# http://www.a-netz.de/2013/02/ramdisks-for-the-raspberry/ | |
# http://web.archive.org/web/20140701023126/http://raspberry.pi.gw.gd/t50-Using-ZRAM.html | |
#zram | |
sudo modprobe zram zram_num_devices=1 | |
lsmod | grep zram | |
Script Contents: | |
#!/bin/sh -e |
OlderNewer