- First:
- Find...
(?:ISODate|ObjectId)\(("[^"]+")\)
(BSON types) - And replace with...
$1
(the non-ignored capture group)
- Find...
- Second:
- Find...
(/\*\s+\d+\s+\*/)
(index comments) - And replace with...
,
(comma to separate array elements)
- Find...
- Finally
- Remove the stray comma where
/* 1 */
used to be
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
package Less::Boilerplate; | |
use 5.26.0; | |
use strict; | |
use warnings; | |
use feature (); |
[ Update 2020-05-31: I won't be maintaining this page or responding to comments anymore (except for perhaps a few exceptional occasions). ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
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
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
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
/usr/bin/php56s -d register_argc_argv=1 "./composer.phar" install |
- Get node binary (node.exe) from http://nodejs.org/download/
- Create the folder where node will reside and move node.exe to it
- Download the last zip version of npm from http://nodejs.org/dist/npm
- Unpack the zip inside the node folder
- Download the last tgz version of npm from http://nodejs.org/dist/npm
- Open the tgz file and unpack only the file bin/npm (without extension) directly on the node folder.
- Add the the node folder and the packages/bin folder to PATH
- On a command prompt execute
npm install -g npm
to update npm to the latest version
Now you can use npm and node from windows cmd or from bash shell like Git Bash of msysgit.
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
/* | |
******************************************************************************** | |
Golang - Asterisk and Ampersand Cheatsheet | |
******************************************************************************** | |
Also available at: https://play.golang.org/p/lNpnS9j1ma | |
Allowed: | |
-------- | |
p := Person{"Steve", 28} stores the value |
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 | |
ssh -L 5555:localhost:5432 vagrant@localhost -p 2222 -i ~/.vagrant.d/insecure_private_key -fNg # local port 5555 <-> Vagrant port 5432 |
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
The Challenge | |
------------- | |
Given the following riddle, write a regular expression describing all possible answers, | |
assuming you never make a move which simply undoes the last one you made. | |
The Riddle | |
---------- | |
You are on your way somewhere, taking with you your cabbage, goat, and wolf, as always. | |
You come upon a river and are compelled to cross it, but you can only carry one of the | |
three companions at a time. None of them can swim because this isn't THAT kind of riddle. |
NewerOlder