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
var mongoObjectId = function () { | |
var timestamp = (new Date().getTime() / 1000 | 0).toString(16); | |
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function() { | |
return (Math.random() * 16 | 0).toString(16); | |
}).toLowerCase(); | |
}; |
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/env python | |
""" | |
Very simple HTTP server in python (Updated for Python 3.7) | |
Usage: | |
./dummy-web-server.py -h | |
./dummy-web-server.py -l localhost -p 8000 | |
Send a GET request: |
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
# Create a new repository on the command line | |
touch README.md | |
git init | |
git add README.md | |
git commit -m "first commit" | |
git remote add origin https://github.com/c0ldlimit/vimcolors.git | |
git push -u origin master | |
# Push an existing repository from the command line |
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
{ | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true | |
}, | |
"plugins": ["react"], | |
"ecmaFeatures": { |
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
taskkill /F /IM ssh-agent.exe /T |
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
# Adapted from https://developers.yubico.com/ykneo-openpgp/ResetApplet.html | |
gpg-connect-agent <<EOF | |
/hex | |
scd serialno | |
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40 | |
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40 | |
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40 | |
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40 | |
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40 | |
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40 |
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
......... Oh shit, you were waiting for me to do something? Oh okay, well then. | |
% | |
Not panicking...totally not panicking...er...everything's fine... | |
% | |
Following the white rabbit.... | |
% | |
"Going the distance..." | |
% | |
The Elders of the Internet are contemplating your request... | |
% |
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
{ | |
"bracket-pair-colorizer-2.colors": [ | |
"Gold", | |
"Orchid", | |
"LightSkyBlue", | |
"Salmon", | |
"LawnGreen", | |
"DarkOrange", | |
"Cornsilk" | |
], |
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
import { sitemapBuilder as buildSitemap } from 'react-router-sitemap'; | |
import routes from '../routes'; | |
import path from 'path'; // add path which will be needed for file write | |
import fs from 'fs'; // import file system object | |
// use your website root address here. Optimally you can | |
// include dev and production enviorenments with variable | |
const hostname = 'http://localhost:3000'; | |
// define our destination folder and sitemap file name |
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
[wsl2] | |
kernel= # An absolute Windows path to a custom Linux kernel. | |
memory= # How much memory to assign to the WSL2 VM. | |
processors= # How many processors to assign to the WSL2 VM. | |
swap= # How much swap space to add to the WSL2 VM. 0 for no swap file. | |
swapFile= # An absolute Windows path to the swap vhd. | |
localhostForwarding= # Boolean specifying if ports bound to wildcard or localhost in the WSL2 VM should be connectable from the host via localhost:port (default true). | |
# entries must be absolute Windows paths with escaped backslashes, for example C:\\Users\\Ben\\kernel | |
# entries must be size followed by unit, for example 8GB or 512MB |
OlderNewer