As configured in my dotfiles.
start new:
tmux
start new with session name:
| #To visualize branches: | |
| git branch | |
| #To create a new branch: | |
| git branch testbranch | |
| #To change to created branch: | |
| git checkout testbranch | |
| #Track new files: |
| # ~/.bashrc: executed by bash(1) for non-login shells. | |
| # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
| # for examples | |
| # If not running interactively, don't do anything | |
| [ -z "$PS1" ] && return | |
| # don't put duplicate lines in the history. See bash(1) for more options | |
| # ... or force ignoredups and ignorespace | |
| HISTCONTROL=ignoredups:ignorespace |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| Windows Registry Editor Version 5.00 | |
| [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\monokai] | |
| "Colour21"="255,255,255" | |
| "Colour20"="245,222,179" | |
| "Colour19"="200,240,240" | |
| "Colour18"="0,217,217" | |
| "Colour17"="179,146,239" | |
| "Colour16"="174,129,255" | |
| "Colour15"="122,204,218" |
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "flag" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| ) |
| #!/usr/bin/env python | |
| import random | |
| LARGE_SHORT_SWORD_DAMAGE = 8 | |
| def roll_d(die_size): | |
| return random.randint(1, die_size) |
Fonte: http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html?round=two
I accidentally stumbled upon something yesterday that I felt like sharing, which fell squarely into the "why the hell didn't I know about this before?" category. In this post, I'll describe how to manage the various configuration files in your GNU/Linux home directory (aka "dotfiles" like .bashrc) using GNU Stow.
The difficulty is that it would be helpful to manage one's configuration files with a version control system like Git, Mercurial or Bazaar, but many/most dotfiles reside at the top-level of your home directory, where it wouldn't be a good idea to initialize a VCS repository. Over time I've come across various programs which aim to manage this for you by keeping all the files in a subdirectory and then installing or linking them into their appropriate places. None of those programs ever really appealed to me. They would require a ton of dependencies (like Ruby and a ton of libraries for it) or t
| #!/bin/bash | |
| #13:16 $ ./check_memory.sh | |
| #OK - Used: 197/3953 (4%);|'Memory Used'=197MB;3360;3755;4053 | |
| #Swap Usage: 0/3905 (0%);|'Swap Used'=0MB;3319;3709;4005 | |
| MEMTOTAL=$(free | awk '/Mem/ {printf("%d",$2/1024)}') | |
| SWAPTOTAL=$(free | awk '/Swap/ {printf("%d", $2 / 1024)}') | |
| # Get the memory usage in % |
$ uname -r