Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key
| # docker build -t ubuntu1604py36 | |
| FROM ubuntu:16.04 | |
| RUN apt-get update && \ | |
| apt-get install -y software-properties-common && \ | |
| add-apt-repository ppa:jonathonf/python-3.6 | |
| RUN apt-get update | |
| RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv | |
| RUN apt-get install -y git |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
| from __future__ import print_function | |
| import time | |
| import functools | |
| import contextlib | |
| LOG_FMT = "{name}: {cp} @{total:0.4f}s ({dur:0.4f}s since {prev})" | |
| def coroutine(f): | |
| @functools.wraps(f) | |
| def coro(*args, **kwargs): |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| require 'msf/core' | |
| require 'crypt/blowfish' # sorry, openssl is limited to 16-byte key size :( | |
| # add gem 'crypt', '1.1.4' to Gemfile | |
| module ::Crypt | |
| class Blowfish | |
| def setup_blowfish() | |
| @sBoxes = Array.new(4) { |i| INITIALSBOXES[i].clone } | |
| @pArray = INITIALPARRAY.clone | |
| keypos = 0 |
| <!--[if mso]> | |
| <center> | |
| <table><tr><td width="580"> | |
| <![endif]--> | |
| <div style="max-width:580px; margin:0 auto;"> | |
| <p>This text will be centered and constrained to 580 pixels even on Outlook which does not support max-width CSS</p> | |
| </div> | |
| <!--[if mso]> |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| #!/usr/bin/env sh | |
| # Download lists, unpack and filter, write to stdout | |
| curl -s https://www.iblocklist.com/lists.php \ | |
| | sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| | xargs wget -O - \ | |
| | gunzip \ | |
| | egrep -v '^#' |
| To remove a submodule you need to: | |
| Delete the relevant line from the .gitmodules file. | |
| Delete the relevant section from .git/config. | |
| Run git rm --cached path_to_submodule (no trailing slash). | |
| Commit and delete the now untracked submodule files. |