command | description |
---|---|
ctrl + a | Goto BEGINNING of command line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1 | |
# --no-check-cerftificate was necessary for me to have wget not puke about https | |
curl -LJO https://github.com/joyent/node/tarball/v0.7.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# generate new personal ed25519 ssh keys | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>" | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>" | |
# generate new host cert authority (host_ca) ed25519 ssh key | |
# used for signing host keys and creating host certs | |
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Original script by Geoffeg, modified by Roblight and later by me (alias me='alias Danog='Daniil Gentili'') | |
### How to install this script: | |
### wget https://gist.githubusercontent.com/danog/f86bf3113e1644b4d5d9/raw/dropbox_youtube_dl.sh -O ~/dropbox_youtube_dl.sh && chmod 755 ~/dropbox_youtube_dl.sh && ~/dropbox_youtube_dl.sh --install | |
### | |
### IFTTT Recipe URL: https://ifttt.com/recipes/277403-download-every-youtube-video-you-add-to-your-watch-later-playlist-automatically | |
if [ "$1" = "--install" ]; then | |
if [ -f /usr/local/bin/youtube-dl ]; then echo "Youtube-dl already installed."; else echo "Installing youtube-dl..."; sudo curl https://yt-dl.org/downloads/2015.04.03/youtube-dl -o /usr/local/bin/youtube-dl && sudo chmod a+x /usr/local/bin/youtube-dl && echo "YouTube-dl installed successfully." || echo "Couldn't install YouTube-dl."; fi |
My preferred code style is 2-space K&R. This is intended to provide a justification for this style.
K&R style has the following properties:
- Provides symmetric size (in terms of screen space consumed) between the opening and closing syntax of a clode block.
- Forces no empty or meaningless lines, thereby avoiding artificial distance between related things that should be together.
- Consumes the minimum vertical space while keeping the opening and closing syntax of a block on separate lines from the content.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Install-Scoop { | |
New-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" ` | |
-propertyType ExpandString ` | |
-name "SCOOP_GLOBAL" ` | |
-value "${ENV:PROGRAMDATA}\scoop" | |
Invoke-WebRequest 'https://get.scoop.sh' | Invoke-Expression | |
'scoop install Git-with-OpenSSH Sudo Which --global' | Set-Content -path temp_script.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
msys2 vs msys vs msysgit | |
MinGW doesn't provide a linux-like environment, that is MSYS(2) and/or Cygwin | |
Cygwin is an attempt to create a complete UNIX/POSIX environment on Windows. | |
MinGW is a C/C++ compiler suite which allows you to create Windows executables - you only | |
need the normal MSVC runtimes, which are part of any normal Microsoft Windows installation. | |
MinGW provides headers and libraries so that GCC (a compiler suite, | |
not just a "unix/linux compiler") can be built and used against the Windows C runtime. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /------------------------------------------\ | |
# | don't forget to download the .tp file | | |
# | and place it in the user's directory :› | | |
# | | | |
# | also install lolcat: | | |
# | https://github.com/busyloop/lolcat | | |
# \------------------------------------------/ | |
alias test-passed='if [ "$?" -eq "0" ]; then lolcat ~/.tp -a -s 40 -d 2; fi;' |
Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font
To setup native Linux, see this gist
Ensure that you have WSL installed (you can find instructions to do so here) and that you are running Windows 10 build 18917 or higher
To make sure you are using build 18917 or higher please join the Windows Insider Program and select the 'Fast' ring or the 'Slow' ring.
You can check your Windows version by opening Command Prompt and running the ver
command.
OlderNewer