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
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
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
| #XLarge DBInstanceClassMemory = 15892177440 = 14.8GB | |
| #/32 = 496630545 = 473MB | |
| #/64 = 248315272 = 236MB | |
| #/128 = 124157636 = 118MB | |
| #/256 = 62078818 = 59MB | |
| #/512 = 31039409 = 29MB | |
| #/12582880 = 1263 #default same divisor as max_connections = 4041.6MB = 4237924762 | |
| #/25165760 = 623 # half of max_connections = 1993.6MB | |
| #/50331520 = 315 # quarter of max_connections = 1008MB = 1056964608 | |
| #*(3/4) #default innodb pool size = 11922309120 |
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 python | |
| # Public domain. | |
| """A script to establish an SSH SOCKS proxy and enable it in the OS X network configuration. | |
| Cleanly handles failure to connect. Kills ssh and removes network configuration on CTRL-C. | |
| First argument gives the hostname for use with ssh.""" | |
| import subprocess, sys, signal | |
| proxy_command_base = ['networksetup', '-setsocksfirewallproxystate', 'Wi-Fi'] |
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 ruby | |
| progress = 'Progress [' | |
| 1000.times do |i| | |
| # i is number from 0-999 | |
| j = i + 1 | |
| # add 1 percent every 10 times | |
| if j % 10 == 0 |
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
| Note 1: The following CQ curl commands assumes a admin:admin username and password. | |
| Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command. | |
| Example: -F"":operation=delete"" | |
| Note 3: Quotes around name of package (or name of zip file, or jar) should be included. | |
| Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console) | |
| curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle" | |
| Install a bundle | |
| curl -u admin:admin -F action=install -F bundlestartlevel=20 -F |
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 | |
| # | |
| # yoga-auto-rotate -- ghetto-style tablet mode, with keyboard and all. | |
| # | |
| # Simple little script that will detect an orientation change for a | |
| # Lenovo Yoga 13 (very hackily) and adjust the active display's | |
| # orientation and disable/enable the touchpad as necessary. | |
| # | |
| # The Yoga 13 will emit keycode `e03e` at one second intervals | |
| # when the screen is flipped into tablet mode. Since this keycode |
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 | |
| # | |
| # rotate_desktop.sh | |
| # | |
| # Rotates modern Linux desktop screen and input devices to match. Handy for | |
| # convertible notebooks. Call this script from panel launchers, keyboard | |
| # shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.). | |
| # | |
| # Using transformation matrix bits taken from: | |
| # https://wiki.ubuntu.com/X/InputCoordinateTransformation |
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 | |
| set -e | |
| ARG_ONE=${1:-ONE} | |
| ARG_TWO=${2:-TWO} | |
| ARG_THREE=${3:-THREE} | |
| echo "1:${ARG_ONE} - 2:${ARG_TWO} - 3:${ARG_THREE}" |
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
| curl -s -I -H "Pragma: akamai-x-cache-on" http://images.apple.com/ipad/images/product_title.png | grep X-Cache: |
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
| $ dpkg -S /usr/sbin/tcpd | |
| tcpd: /usr/sbin/tcpd | |
| $ (cd /; md5sum -c /var/lib/dpkg/info/tcpd.md5sums) | |
| usr/sbin/safe_finger: OK | |
| usr/sbin/tcpd: OK | |
| usr/sbin/tcpdchk: OK | |
| usr/sbin/tcpdmatch: OK | |
| usr/sbin/try-from: OK | |
| usr/share/man/man8/safe_finger.8.gz: OK | |
| usr/share/man/man8/tcpd.8.gz: OK |