- maim
- xclip
Set this on your i3 config file ~/.i3/config
# Screenshots
| # This file has been auto-generated by i3-config-wizard(1). | |
| # It will not be overwritten, so edit it as you like. | |
| # | |
| # Should you change your keyboard layout some time, delete | |
| # this file and re-run i3-config-wizard(1). | |
| # | |
| # i3 config file (v4) | |
| # | |
| # Please see https://i3wm.org/docs/userguide.html for a complete reference! |
| # Set the control character to Ctrl+Spacebar (instead of Ctrl+B) | |
| set -g prefix C-space | |
| unbind-key C-b | |
| bind-key C-space send-prefix | |
| # Set new panes to open in current directory | |
| bind c new-window -c "#{pane_current_path}" | |
| bind '"' split-window -c "#{pane_current_path}" | |
| bind % split-window -h -c "#{pane_current_path}" |
The i3-wm does not come with a keybinding to lock the screen or a preconfigured auto lockscreen. This gist describes how to setup both using i3lock and xautolock. i3lock is a minimalistic lockscreen and xautolock monitors mouse and keyboard activities to automatically lock the screen after a certain time of beiing inactive.
First get the tools if neccessary.
E.g. sudo apt install i3lock xautolock.
To setup the keybinding Ctrl+Alt+l (last one is a lowercase L) to lock the screen append the following lines to the i3 configuration file located at ~/.config/i3/config.
# keybinding to lock screen
| # ignore everything in the root except the "wp-content" directory. | |
| /* | |
| !wp-content/ | |
| # ignore everything in the "wp-content" directory, except the themes directories | |
| wp-content/* | |
| !wp-content/themes/ | |
| # ignore all mu-plugins, plugins, and themes | |
| # unless explicitly whitelisted at the end of this file |
| DROP TABLE currency; | |
| -- Create table variable | |
| CREATE TABLE currency ( | |
| name VARCHAR(20), | |
| code VARCHAR(3), | |
| symbol VARCHAR(5) | |
| ); | |
| ALTER TABLE currency CONVERT TO CHARACTER SET utf8; |
| #!/bin/sh | |
| # Borrowed from http://marcparadise.com/blog/2013/09/21/how-to-fix-a-corrupt-history-file/ | |
| # If you ever see a message like this upon starting a new shell | |
| # zsh: corrupt history file /home/marc/.zsh_history | |
| # here is a quick fix | |
| cd ~ | |
| mv .zsh_history .zsh_history_bad | |
| strings .zsh_history_bad > .zsh_history | |
| # And reload history | |
| fc -R .zsh_history |
| <?php | |
| //https://github.com/laravel/framework/issues/2093#issuecomment-39154456 | |
| use Illuminate\Database\Eloquent\Model as Eloquent; | |
| use Illuminate\Database\Eloquent\Relations\Pivot; | |
| class User extends Eloquent { | |
| public function groups() { | |
| return $this->belongsToMany('Group'); |
Outdated note: the process is a lot easier now: after you brew install postgresql you can initialize or stop the daemon with these commands: brew services start postgresql or brew services stop postgresql.
new out put may look like
To have launchd start postgresql now and restart at login:
brew services start postgresql
Or, if you don't want/need a background service you can just run:
pg_ctl -D /usr/local/var/postgres start