ALTER USER username TEMPORARY TABLESPACE temp_tablespace_name;
ALTER USER username DEFAULT TABLESPACE tablespace_name;
select df.tablespace_name "Tablespace",
totalusedspace "Used MB",
(df.totalspace - tu.totalusedspace) "Free MB",
RENAMING SESSIONS:
C-a :sessionname mySessionName
Screen's -X switch lets you rename a session without attaching it.
screen -X sessionname foobars
LIST RUNNING SESSIONS:
As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/bin/bash | |
# run this command to flush dns cache: | |
sudo /etc/init.d/dns-clean restart | |
# or use: | |
sudo /etc/init.d/networking force-reload | |
# Flush nscd dns cache: | |
sudo /etc/init.d/nscd restart | |
# If you wanted to refresh your settings you could disable and then run | |
sudo service network-manager restart |
This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :
#/bin/bash | |
# https://github.com/segmentio/terraform-docs/releases/tag/v0.7.0 | |
curl https://github.com/segmentio/terraform-docs/releases/download/v0.7.0/terraform-docs-v0.7.0-darwin-amd64 --output terraform-docs | |
mv /usr/local/bin/terraform-docs /usr/local/bin/old.terraform-docs | |
mv terraform-docs /usr/local/bin/terraform-docs | |
# change to whatever permissions you feel comfortable with | |
chmod 777 /usr/local/bin/terraform-docs |
func InitializeEverything() { | |
objectA := NewObjectACollector() | |
objectB := NewObjectBCollector() | |
objectC := NewObjectCCollector() | |
objectD := NewObjectDCollector() | |
objectE := NewObjectECollector() | |
objectF := NewObjectFCollector() | |
objectG := NewObjectGCollector() | |
objectH := NewObjectHCollector() | |
objectI := NewObjectICollector() |
package main | |
import ( | |
"fmt" | |
) | |
const ( | |
collectorCount = 4 | |
) |
func InitializeCollector(i int) func() { | |
return [...]interface{}{ | |
NewObjectACollector, | |
NewObjectBCollector, | |
NewObjectCCollector, | |
NewObjectDCollector, | |
NewObjectECollector, | |
}[i].(func()) | |
} |
func main() { | |
for i := 0; i <= collectorCount; i++ { | |
InitializeCollector(i)() | |
} | |
} |