start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
Do you use an usb mouse and keyboard and have laptop_mode installed under your Arch linux ? Then maybe you have the same problems as me - mouse and keyboard getting inactive every 2 seconds or so.
To solve this, go to /etc/laptop-mode/conf.d
and copy usb-autosuspend.conf
to /etc/laptop-mode/conf.d/board-specific
.
After that run lsusb
and get the ID of the usb device you want, e.g., 093a:2500
.
Open the board-specific/usb-autosuspend.conf
file and find the AUTOSUSPEND_USBID_BLACKLIST
conf option.
Put the desired usb IDs there. You might need to run sudo laptop_mode
afterwards to reload the configs.
#!/bin/bash | |
aptitude -y install expect | |
// Not required in actual script | |
MYSQL_ROOT_PASSWORD=abcd1234 | |
SECURE_MYSQL=$(expect -c " | |
set timeout 10 |
import boto.vpc | |
import time | |
REGION_NAME = 'us-west-2' | |
AMI_ID = 'ami-8e27adbe' # Amazon Linux AMI | |
conn = boto.vpc.connect_to_region(REGION_NAME) | |
# Create a VPC | |
vpc = conn.create_vpc('10.0.0.0/16') |
Setup vagrant vm
vagrant box add precise64 http://files.vagrantup.com/precise64.box
vagrant init precise64
sed -i 's/# config.vm.network :hostonly/config.vm.network :hostonly/' Vagrantfile
vagrant up
vagrant ssh
Install base software and apache (to have something to proxy)
The MIT License (MIT) | |
Copyright (c) 2014 Matteo Rinaudo | |
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 | |
furnished to do so, subject to the following conditions: |
#!/bin/bash | |
# | |
# Automate mysql secure installation for debian-baed systems | |
# | |
# - You can set a password for root accounts. | |
# - You can remove root accounts that are accessible from outside the local host. | |
# - You can remove anonymous-user accounts. | |
# - You can remove the test database (which by default can be accessed by all users, even anonymous users), | |
# and privileges that permit anyone to access databases with names that start with test_. |
## Modified commands | |
alias diff='colordiff' # requires colordiff package | |
alias grep='grep --color=auto' | |
alias more='less' | |
alias df='df -h' | |
alias du='du -c -h' | |
alias mkdir='mkdir -p -v' | |
alias nano='nano -w' | |
alias ping='ping -c 5' |
1. replace apt-get upgrade to install only security patches: | |
http://askubuntu.com/questions/194/how-can-i-install-just-security-updates-from-the-command-line | |
2. use unattended-upgrade | |
3. automate unattended-upgrade with cron | |
https://help.ubuntu.com/community/AutomaticSecurityUpdates | |
4. get alerts about pending updates: |