| Command | Description | Example |
|---|---|---|
parallel echo ::: A B C |
🔤 Process items in parallel | Output: A, B, C (in any order) |
parallel echo {} ::: *.txt |
🔍 Use {} as placeholder | Echoes names of all .txt files |
cat file.txt | parallel echo |
📥 Read input from stdin | Processes each line of file.txt |
parallel -j4 command ::: item1 item2 item3 |
🔢 Limit to 4 jobs at a time | Runs 'command' on items, max 4 parallel |
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
| # The initial version | |
| if [ ! -f .env ] | |
| then | |
| export $(cat .env | xargs) | |
| fi | |
| # My favorite from the comments. Thanks @richarddewit & others! | |
| set -a && source .env && set +a |
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 | |
| # This is based on this excellent gist https://gist.github.com/jvenator/9672772a631c117da151 | |
| # Nothing of this is my original work, except that I made the download link an argument | |
| # to this script, so it installs on OSX 10.11 | |
| # | |
| # Thank you jvenator & sethetter | |
| set -e | |
| error() { info "$1"; exit 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
| # block content | |
| location ~ ^/content/(.*).(txt|md|mdown)$ { | |
| rewrite ^/content/(.*).(txt|md|mdown)$ /error redirect; | |
| } | |
| # block all files in the site folder from being accessed directly | |
| location ~ ^/site/(.*)$ { | |
| rewrite ^/site/(.*)$ /error redirect; | |
| } |
This Gist is a collection of configuration files that can be used to easily setup a Homebrew-based LEMP stack on Mac OS X.
Files in this repository are numbered and named for ordering purposes only. At the top of each file is a section of metadata that denote what component the file belongs to and the default name & location of the file. Feel free to implement it however you want.
Note: some configuration files have hard-coded paths to my user directory -- fix it for your setup
| title | author | layout | categories | |||
|---|---|---|---|---|---|---|
Using grunt and angular with pushstate support |
Blackjid |
post |
|
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
| Ember.GoogleAnalytics = Ember.Mixin.create({ | |
| trackPageView: function() { | |
| if(!Ember.isNone(ga)) { | |
| Ember.run.next(function() { | |
| var loc = window.location, | |
| page = loc.hash ? loc.hash.substring(1) : loc.pathname + loc.search; | |
| ga('send', 'pageview', page); | |
| }); | |
| } |
NewerOlder