VirtualTam's bookmarks

  1. A GitHub-like contributions calendar, but locally, with all your git commits

  2. Awesome-Selfhosted 2015-07-13

    A list of software which can be hosted locally.

    See https://prism-break.org/ for a more complete list

  3. Pro: no need to setup a DNS server to test virtualhosts Con: keep in mind that all "fake" hosts will point to 127.0.0.1!

    1. Use /etc/hosts to declare test hosts / domains / subdomains
    #<ip-address>	<hostname.domain.org>	<hostname>
    127.0.0.1	localhost.localdomain	localhost
    127.0.0.1	host.localdomain	host
    127.0.0.1	sub.host.localdomain	sub.host
    ::1		localhost.localdomain	localhost
    
    1. Allow per-user virtualhost definition in either (depending on your distro)
    • /etc/httpd/conf/httpd.conf
    • /etc/apache2/apache2.conf

    Include /home/albert/.httpd/*.conf

    1. Profit! Create virtualhosts with local hostnames :)
  4. electric-indent has been activated by default in emacs 24

    to disable it for Python: (add-hook 'python-mode-hook (lambda () (set (make-local-variable 'electric-indent-functions) (list (lambda (arg) 'no-indent)))))

  5.  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)
    
  6. in GITOLITE_USER/.gitolite.rc:

    $ENV{PATH} = "/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:$ENV{PATH}"
    
  7.  1#!/bin/bash
     2# Check if a file needs to be downloaded
     3# Useful iff there is no checksum available to check a local file
     4url=http://test-url.com
     5
     6dl=1
     7if [[ -f $file_path ]]; then
     8    local_size=$(ls -l $file_path | awk '{print $5}')
     9    remote_size=$(wget --spider $url 2>&1 | awk '/Length/ {print $2}')
    10
    11    if [[ $local_size -eq $remote_size ]]; then
    12        echo "The file was previously downloaded"
    13        dl=0
    14    else
    15        echo "Corrupted file found, re-downloading..."
    16        rm -f $file_path
    17    fi
    18else
    19    echo "Downloading file..."
    20fi
    21
    22[[ $dl -eq 1 ]] && wget $url -O $file_path
    
  8. Change install dir:

    • get the EarSketch installer,
    • launch it, install Reaper and EarSketch to the default location => C:\Program Files{EarSketch, REAPER (x64)},
    • install the other softs (Python 2.7 and its extensions, Kommodo) where they belong,
    • move the REAPER (x64) folder to a new location,
    • edit the registry value [HKEY\LOCAL MACHINE\SOFTWARE\REAPER] to reflect this new location,
    • edit the Actions menu file to reflect the new Plugins folder locations [%appdata%\REAPER\reaper-kb.ini],
    • (restart Reaper),
    • clean the cache.