start new:
tmux
start new with session name:
tmux new -s myname
# Add the following 'help' target to your Makefile | |
# And add help text after each target name starting with '\#\#' | |
help: ## Show this help. | |
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | |
# Everything below is an example | |
target00: ## This message will show up when typing 'make help' | |
@echo does nothing |
# Assume we are in your home directory | |
cd ~/ | |
# Clone the repo from GitLab using the `--mirror` option | |
$ git clone --mirror [email protected]:mario/my-repo.git | |
# Change into newly created repo directory | |
$ cd ~/my-repo.git | |
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks. |
ssh-keygen | |
-t ed25519 - for greatest security (bits are a fixed size and -b flag will be ignored) | |
-t rsa - for greatest portability (key needs to be greater than 4096 bits) | |
-t ecdsa - faster than RSA or DSA (bits can only be 256, 284, or 521) | |
-t dsa - DEEMED INSECURE - DSA limted to 1024 bit key as specified by FIPS 186-2, No longer allowed by default in OpenSSH 7.0+ | |
-t rsa1 - DEEMED INSECURE - has weaknesses and shouldn't be used (used in protocol 1) | |
-b 4096 bit size | |
-a 500 rounds (should be no smaller than 64, result in slower passphrase verification and increased resistance to brute-force password cracking) | |
-C "[email protected]" comment.. |
A simple setup for Sublime to jot down notes in Markdown and compile a nice PDF with LaTeX through Pandoc conversion.
Why? Markdown is quick and easy to write, LaTeX is more of a hassle. But LaTeX produces nice PDFs. Using Pandoc, you can utilize the best features of both worlds by writing in markdown and compiling PDFs with LaTeX, with a simple one-click in your editor. This works fairly well for simple documents and pandoc supports most of Markdown syntax, in addition to supporting a range of variables set in a YAML meta block. Did I mention that it also supports writing LaTeX-style math and other LaTeX-commands in your Document? (Like this:
The output PDF is a A4 paper with 12pt font and 1 inch margins. It uses fancyhead
to style the header and footer with date, pagenumbering and title/author. (This can be changed in your Pandoc-settings)
# send logs for all traffic (including non-html) to google analytics | |
# | |
# in server block: | |
# set $google_analytics_id "UA-THECORRECT-ID"; | |
# include /srv/nginx/google_analytics; | |
# | |
# in location blocks: | |
# post_action @ga; | |
# | |
# notes: post_action has been referred to by nginx devs as a "dirty hack" and this approach may stop working one day. |
import sys | |
import asyncio | |
from aiohttp import ClientSession | |
async def fetch(url, session): | |
async with session.get(url) as response: | |
response = await response.read() | |
async def limit_fetch(sem, url, session): | |
async with sem: |