===== Infrastructure ===== ==== Safe Browsing ==== * HTTPS Everywhere * uBlock Origin * PrivacyBadger https://digitalcourage.de/digitale-selbstverteidigung/pc ==== Linux Mint Setup ==== Change the font size: Preferences > Appearance > Fonts > DPI > [x] Own DPI value (modify value) ==== Ubuntu Setup ==== Get latest desktop version from the [[http://www.ubuntu.com/desktop|Ubuntu website]]. For usage as a [[https://www.virtualbox.org/|VirtualBox]] virtual machine install guest extensions: sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11 === Shortcuts === [[https://help.ubuntu.com/community/KeyboardShortcuts|Ubuntu general keyboard shortcuts]]. [[http://askubuntu.com/questions/141752/keyboard-shortcut-to-move-windows-between-monitors|Move the window]]: apt-get install compizconfig-settings-manager compiz-plugins-extra CompizConfig Settings Manager | [x] Put: Set shortcut for Put To Next Output. Maximize and minimize windows: System settings | Keyboard | Shortcuts * Maximize windows: Super+Up * Restore window size: Super+Down === Sublime Text ==== == Installation == Download the latest version of [[https://www.sublimetext.com/|Sublime Text]]. tar xf Sublime\ Text\ 2.0.2\ x64.tar.bz2 sudo mv Sublime\ Text\ 2 /opt/ sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/sublime Create start bar icon: sudo sublime /usr/share/applications/sublime.desktop Paste into sublime.desktop: [Desktop Entry] Version=1.0 Name=Sublime Text 2 # Only KDE 4 seems to use GenericName, so we reuse the KDE strings. # From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413. GenericName=Text Editor Exec=sublime Terminal=false Icon=/opt/Sublime Text 2/Icon/48x48/sublime_text.png Type=Application Categories=TextEditor;IDE;Development X-Ayatana-Desktop-Shortcuts=NewWindow [NewWindow Shortcut Group] Name=New Window Exec=sublime -n TargetEnvironment=Unity == Setup == Install [[https://packagecontrol.io/installation#st2|Package Control]], View | Show Console, execute: import urllib2,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation') Install packages (CTRL+SHIFT+P, "Package Control: Install Package"): * [[https://packagecontrol.io/packages/Alignment|Alignment]], [[http://www.granneman.com/webdev/editors/sublime-text/packages/how-to-install-and-use-sublime-alignment/|Tutorial]] * [[https://packagecontrol.io/packages/Diffy|Diffy]] * [[https://packagecontrol.io/packages/dired|dired]]: Displays a directory in a view, allowing easy file manipulation * [[https://packagecontrol.io/packages/FileDiffs|FileDiffs]] * [[https://github.com/kemayo/sublime-text-2-goto-documentation|GotoDocumentation]] * [[https://facelessuser.github.io/HexViewer/|HexViewer]] * [[https://github.com/dzhibas/SublimePrettyJson|Pretty JSON]] * [[https://packagecontrol.io/packages/Python%20PEP8%20Autoformat|Python PEP8 Autoformat]] * [[https://packagecontrol.io/packages/PyYapf%20Python%20Formatter|PyYapf Python Formatter]] * [[https://packagecontrol.io/packages/Restructured%20Text%20%28RST%29%20Snippets|Restructured Text (RST) Snippets]] * [[https://packagecontrol.io/packages/RestructuredText%20Improved|Restructured​Text Improved]] * [[https://github.com/Kronuz/SublimeCodeIntel|SublimeCodeIntel]] * [[https://github.com/SublimeLinter/SublimeLinter-for-ST2|SublimeLinter]] * [[https://packagecontrol.io/packages/SqlBeautifier|SqlBeautifier]] * [[https://packagecontrol.io/packages/Terminal|Terminal]] * [[https://packagecontrol.io/packages/TrailingSpaces|TrailingSpaces]] * [[https://github.com/jonathandelgado/SublimeTodoReview|TodoReview]] * [[https://github.com/spadgos/sublime-ToggleQuotes|ToggleQuotes]] * [[https://github.com/ehuss/Sublime-Wrap-Plus|Wrap Plus]] * ([[https://github.com/freewizard/SublimeFormatSQL|Format SQL]]) [[https://realpython.com/blog/python/setting-up-sublime-text-3-for-full-stack-python-development/|Sublime Text 3 for Python Development]] === Git installation === sudo apt-get install git-core git-gui git-doc === Issues with Ubuntu in VirtualBox ==== Restoring the VM after it was saved freezes Ubuntu. Resizing the VM windows helps to resolve the issue: [[https://www.virtualbox.org/ticket/13487|VirtualBox Ticket #13487: Ubuntu Desktop 14.04.1 freezes when restarting from saved state (3D)]] ==== VirtualBox ==== Change the UUID of a hard drive: VBoxManage.exe internalcommands sethduuid Hard_Disk.vdi ==== Unix Settings ==== === Shell Prompt Prefix === export PS1='$(whoami)@$(hostname):$(pwd)$ ' This can be executed manually, added to ~/.profile or ~/.bashrc for using bash and leads to a command shell prompt like: myuser@myserver:/home/myuser$ http://superuser.com/questions/601181/how-to-display-current-path-in-command-prompt-in-linuxs-sh-not-bash ==== Windows Setup ==== Show symbols instead of preview in ALT+TAB window choosing menu: - Right-click task bar | Properties | Taskbar | Preview desktop with Aero Peek | [ ] Use Aero peek to preview desktop Choose colour scheme: - Right-click desktop | Personalize | Basic designs | Windows 7 Basic. Set environment variables without administrator privileges: * English: Start | Accounts | Change my environment variables * German: Start | Benutzerkonten | Eigene Umgebungsvariablen ändern * Registry: HKEY_CURRENT_USER\Environment Taskbar | Properties: * [x] Lock the taskbar * [ ] Auto-hide the taskbar * [x] Use small icons * Taskbar location on screen: Left * Taskbar buttons: Always combine, hide labels ==== Wifi sharing on Windows ==== share_wifi.bat :: Creates a Local Area Connection network adapter. :: For the first time of the connection setup an internet connection must be :: shares with the local area connection. In the network adapter configuration :: select the network adapter which provides the internet connection, choose :: Properties, Sharing, [x] Share with others, select Local Area Connection :: from drop down. Confirm. :: Open network adapter configuration start "" ncpa.cpl :: Configure hosted network netsh wlan set hostednetwork mode=allow ssid=wifi_name key=wifi_key :: Start hosted network netsh wlan start hostednetwork pause :: Stop hosted network netsh wlan stop hostednetwork ==== LDAP ==== === General information === * DN: distinguished name * CN: common name * OU: organizational unit * DC: domain component === Searches === * Find LDAP servers of a domain: nslookup -type=srv _ldap._tcp.DOMAINNAME * Search within base DN: ldapsearch -h example.com -b ",dc=example,dc=com" "cn=MY_IDENTIFIER" * Search the whole database: ldapsearch -h example.com "cn=MY_IDENTIFIER" * Search a host inside all Oracle TNS strings: ldapsearch -h example.com "orclNetDescString=*HOST=database.tld*" === References === - [[https://tools.ietf.org/search/rfc1558|RFC 1558: A String Representation of LDAP Search Filters]] - [[https://en.wikipedia.org/w/index.php?title=LDAP_Data_Interchange_Format&oldid=661799172|Wikipedia contributors. "LDAP Data Interchange Format." Wikipedia, The Free Encyclopedia, 11 May. 2015. Web. 21 Oct. 2015.]] ==== Windows File System ==== * Hard links * Create: ''> mklink /H linked-file.ext original-file.ext'' * List: ''> fsutil hardlink list linked-file.ext'' * Junctions * Create: ''> mklink /J linked-dir original-dir'' * List: ''> dir'', lists '' linked-dir [original-dir]''