start new:
tmux
start new with session name:
tmux new -s myname
| #!/usr/bin/env python | |
| """ | |
| A script to query the Amazon Web Services usage reports programmatically. | |
| Ideally this wouldn't exist, and Amazon would provide an API we can use | |
| instead, but hey - that's life. | |
| Basically takes your AWS account username and password, logs into the | |
| website as you, and grabs the data out. Always gets the 'All Usage Types' |
| ========================================== ========================================== | |
| TMUX COMMAND WINDOW (TAB) | |
| ========================================== ========================================== | |
| List tmux ls List ^b w | |
| New new -s <session> Create ^b c | |
| Attach att -t <session> Rename ^b , <name> | |
| Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
| Kill kill-session -t <session> Close ^b & |
| package main | |
| import ( | |
| "fmt" | |
| "math" | |
| ) | |
| func Newt(x float64) float64 { | |
| if x == 0 { return 0 } | |
| z := 1.0 |
| sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common | |
| sudo apt-get build-dep vim-gnome | |
| sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev | |
| sudo rm -rf /usr/local/share/vim | |
| sudo rm /usr/bin/vim | |
To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.
Here we limit the system to only C-State 1:
kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1
On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:
Note where home is
(RaspberryPi2)root@localhost:~# df -h /home/
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p4 1.6G 1.3G 160M 89% /oem
(RaspberryPi2)root@localhost:~# df -h
| go build helloworld.go | |
| GOOS=windows GOARCH=amd64 go build helloworld.go |
| $EC2SettingsFile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\BundleConfig.xml" | |
| $xml = [xml](get-content $EC2SettingsFile) | |
| $xmlElement = $xml.get_DocumentElement() | |
| foreach ($element in $xmlElement.Property) | |
| { | |
| if ($element.Name -eq "AutoSysprep") | |
| { | |
| $element.Value="Yes" | |
| } |