VirtualTam's bookmarks

  1. Literate DevOps 2016-03-29

    """ Instead of opening up a terminal to my virtual machine, I pop into Emacs and load this sprint’s /note file/1, create a new header, and enter the shell and ruby commands in this text file.

    What good is this? Unlike a traditional terminal, this allows me to log, document and execute each command.

    As an old bear with very little brains, my prose can explain the background and purpose of each command. Clicking the hyperlink refreshes my memory of previous discoveries. A keychord executes the code block… """

  2. TL;DR - Right Click on window title bar > More Actions > Special Applications Settings > Size and Position > Obey geometry restrictions > Choose Force and leave check mark to No.

    http://www.emacswiki.org/emacs/KdeMaximized https://bbs.archlinux.org/viewtopic.php?id=92115

  3. 1for i in $(find /usr/lib -type f -name '*.so.*'); do
    2      nm -D $i | grep MY_SYMBOL;
    3      [[ $? -eq 0 ]] && echo $i;
    4done
    

    adapted from http://narkive.com/a1rT9Efg.8

  4. An assortment of development-related links, resources and scripts

  5. Context: replace spaces by dashes in a script-generated HTML file's links

    1awk -F\' 'm = /a href/ { gsub(/ /,'-',$2); print$1'\''$2'\''$3} !m {print $0}'
    
  6. 1$ pip install eg
    2$ eg <command>
    
  7. Given your unittests are in the tests directory:

     1# run a specific test module
     2python -m unittest tests.<module>
     3 
     4# run a specific test suite
     5python -m unittest tests.<module>.<class>
     6 
     7# run a specific test
     8python -m unittest tests.<module>.<class>.<test>
     9 
    10# run tests matching a given pattern
    11python -m unittest discover -s tests -p <pattern>
    
  8.  1# setup a transifex virtualenv
     2virtualenv2 VENV; source VENV/bin/activate; pip install transifex-client
     3
     4# global config: ~/.transifexrc
     5# this step can be omitted, as 'tx init' will create the file if it doesn't exist
     6[https://www.transifex.com]
     7username = User
     8token =
     9password = un54f3_p4ssw0rd!
    10hostname = https://www.transifex.com
    11
    12# setup example project
    13mkdir example; cd example
    14tx init
    15tx set --auto-remote https://www.transifex.com/projects/p/my-project/
    16
    17# get the files
    18tx pull -l pt_BR
    19
    20# edit things
    21poedit / linguist-qt4
    22
    23# push to transifex
    24tx push -t
    
  9.  1# Global
     2/etc/environment
     3
     4# X Session
     5/var/lib/AccountsService/users/<username>
     6~/.dmrc
     7~/.xinitrc
     8~/.xprofile
     9
    10# Session
    11/etc/profile
    12/etc/profile.d/*.sh
    13~/.profile
    14
    15# Bash
    16/etc/bash.bashrc
    17~/.bash_profile
    18~/.bashrc
    19
    20# ZSH
    21/etc/zsh/zprofile
    22~/.zshrc
    23
    24# Locales
    25/etc/locale.conf
    26/etc/locale.gen
    27~/.config/locale
    28
    29# Superusers
    30/etc/login.defs
    31/etc/sudoers (use visudo to edit)
    32
    33# SSH
    34/etc/ssh/sshd_config (server-side, can allow the client to pass variables)
    35/etc/ssh/ssh_config (client-side, can send variables to servers)
    36
    37# SaltStack
    38/etc/default/salt-minion (not always included in the distro's packages)