It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # usage: memlog.sh PID | |
| # requires gnuplot and matplotlib (dnf install python2-matplotlib gnuplot) | |
| PID=$1 | |
| LOG=./$PID.log | |
| PNG=./$PID.log.png | |
| echo recording memory usage for PID $PID |
No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.
- Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
- Create or import a key -- see below for https://keybase.io
- Run
gpg --list-secret-keysand look forsec, use the key ID for the next step - Configure
gitto use GPG -- replace the key with the one fromgpg --list-secret-keys
This file contains hidden or 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
| [package] | |
| name = "fst-int" | |
| version = "0.1.0" | |
| authors = ["Andrew Gallant <[email protected]>"] | |
| [dependencies] | |
| byteorder = "0.4" | |
| fst = "0.1" |
This file contains hidden or 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 | |
| ################################################################################ | |
| # Rather than run postgres in its own container, we want to run it on | |
| # the (Ubuntu) host and allow: | |
| # | |
| # + peer connections on the host | |
| # + local md5 connections from any docker container | |
| # | |
| # THIS IS COPY/PASTED FROM COMMAND LINE INPUT AND IS UNTESTED AS A SINGLE SCRIPT | |
| ################################################################################ |
This file contains hidden or 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
| { "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context": | |
| [ | |
| { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, | |
| { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true } | |
| ] | |
| } |
This file contains hidden or 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
| application:open-your-keymap | |
| application:open-your-stylesheet | |
| autocomplete:attach | |
| autoflow:reflow-paragraph | |
| bookmarks:clear-bookmarks | |
| bookmarks:jump-to-next-bookmark | |
| bookmarks:jump-to-previous-bookmark | |
| bookmarks:toggle-bookmark | |
| bookmarks:view-all | |
| check:correct-misspelling |
NOTE: This was first authored on 26 Feb 2014. Things may have changed since then.
C++'s templates could be seen as forming a duck typed, purely functional code generation program that is run at compile time. Types are not checked at the initial invocation stage, rather the template continues to expand until it is either successful, or runs into an operation that is not supported by that specific type – in that case the compiler spits out a 'stack trace' of the state of the template expansion.
To see this in action, lets look at a very simple example:
template
This file contains hidden or 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 | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |