mybaby:~ brainv$ ssh -v 192.168.255.69
OpenSSH_6.7p1 Debian-5, OpenSSL 1.0.1k 8 Jan 2015
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.255.69 [192.168.255.69] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa type -1
""" | |
Example code for resetting the USB port that a Teensy microcontroller is | |
attached to. There are a lot of situations where a Teensy or Arduino can | |
end up in a bad state and need resetting, this code is useful for | |
""" | |
import os | |
import fcntl | |
import subprocess |
- Amazon (https://aws.amazon.com/free/)
- DigitalOcean (https://www.digitalocean.com/join/)
- JMeter Server (https://hub.docker.com/r/hhcordero/docker-jmeter-server) aka "Slave"
- JMeter Client Non-gui (https://hub.docker.com/r/hhcordero/docker-jmeter-client) aka "Master"
On Tue Oct 27, 2015, history.state.gov began buckling under load, intermittently issuing 500 errors. Nginx's error log was sprinkled with the following errors:
2015/10/27 21:48:36 [crit] 2475#0: accept4() failed (24: Too many open files) 2015/10/27 21:48:36 [alert] 2475#0: *7163915 socket() failed (24: Too many open files) while connecting to upstream...
An article at http://www.cyberciti.biz/faq/linux-unix-nginx-too-many-open-files/ provided directions that mostly worked. Below are the steps we followed. The steps that diverged from the article's directions are marked with an *.
-
- Instead of using
su
to runulimit
on the nginx account, useps aux | grep nginx
to locate nginx's process IDs. Then query each process's file handle limits usingcat /proc/pid/limits
(wherepid
is the process id retrieved fromps
). (Note:sudo
may be necessary on your system for thecat
command here, depending on your system.)
- Instead of using
- Added
fs.file-max = 70000
to /etc/sysctl.conf - Added `nginx soft nofile 1
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
# | |
#Example of how to use EasyMDB RS232 | |
#Date June/2014 | |
#Version 1.0.2 | |
#Not warranty, for educational purposes | |
#Thinkchip | |
#V1.0.1 | |
#dispense coin function | |
#Level coin changer added |
session: | |
name: "CMAI" | |
windows: | |
- name: "ApolloPlus" | |
root: "~/cmai/source/apolloplus/" | |
layout: main-vertical | |
filters: | |
before: "echo 'Shits!'" | |
after: "echo 'I am done initializing this pane.'" | |
panes: |
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
As configured in my dotfiles.
start new:
tmux
start new with session name: