notepad

Find

katalogi

find /path/to/your/files/ -type d -exec chmod 755 {} ;

pliki

find /path/to/your/files/ -type f -exec chmod 644 {} ;

Bracketed paste mode

Something has enabled ‚bracketed paste mode’ on your terminal. gnome-terminal (and based on it terminator) does not handle it currently well, see for example:  www.midnight-commander.org. To disable the bracketed paste mode:

$ printf "e[?2004l"

(from http://cirw.in/blog/bracketed-paste)

Podpięcie debug-shell pod sygnał (python)

import code, traceback, signal

def debug(sig, frame):
 """Interrupt running process, and provide a python prompt for
 interactive debugging."""
 d={'_frame':frame} # Allow access to frame object.
 d.update(frame.f_globals) # Unless shadowed by global
 d.update(frame.f_locals)

 i = code.InteractiveConsole(d)
 message = "Signal recieved : entering python shell.nTraceback:n"
 message += ''.join(traceback.format_stack(frame))
 i.interact(message)

def listen():
 signal.signal(signal.SIGUSR1, debug) # Register handler

Grep

mygrep() {
echo Search for ${2} in ${1} ;
grep --color -rnin --include="${1}" "${2}" ;
}

alias gr=mygrep

 

Dreampie with virtualenv

alias dp='(dreampie $(which python) &>/dev/null &)'

 

Windows Live Writer

  1. Download Windows Live Writer installation files from http://wl.dlservice.microsoft.com/download/C/1/B/C1BA42D6-6A50-4A4A-90E5-FA9347E9360C/en/wlsetup-all.exe
  2. Save wlsetup-all.exe file in a folder. Example: c:temp
  3. Open command prompt (cmd.exe)
  4. Navigate within command prompt to location where you saved wlsetup-all.exe file.
    Within the command prompt type: cd c:temp (if that’s the location where you saved the wlsetup-all.exe file)
  5. Type: wlsetup-all.exe /AppSelect:Writer /q /log:C:tempWriter.Log /noMU /noHomepage /noSearch
  6. Hit enter
(source)

Livestreaming to Youtube Live