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
using System; | |
using System.Collections.Generic; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
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
function pad(n, len=6) { | |
n = n.toString(); | |
n.trim(); | |
let q = n.length; | |
for(let i=q; i<len; i++) { | |
n = "0"+n; | |
} | |
return n; | |
} |
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
// Assumes you have a MetaMask wallet running on Chrome | |
/* | |
Put this on the html page | |
<script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js/dist/web3.min.js"></script> | |
*/ | |
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
// Assumes you have a MetaMask wallet running on Chrome | |
/* | |
Put this on the html page | |
<script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js/dist/web3.min.js"></script> | |
*/ | |
// You can get the ABI json for your contract here. |
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
// Assumes you have a MetaMask wallet running on Chrome | |
/* | |
Put this on the html page | |
<script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js/dist/web3.min.js"></script> | |
*/ | |
// You can get the ABI json for your contract here. |
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
[ | |
{ "keys": ["ctrl+alt+left"], "command": "focus_neighboring_group", "args": {"forward": false} }, | |
{ "keys": ["ctrl+alt+right"], "command": "focus_neighboring_group" }, | |
{ "keys": ["ctrl+p"], | |
"command": "insert_snippet", | |
"args": { | |
"contents": "console.log(${1:}$SELECTION);${0}" | |
}, "context": | |
[ | |
{ "key": "selector", "operator": "equal", "operand": "source.js", "match_all": true } |
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
mongoimport --db <dbname> --collection agencies --type csv --headerline --file agency.txt | |
mongoimport --db <dbname> --collection calendardates --type csv --headerline --file calendar_dates.txt | |
mongoimport --db <dbname> --collection calendars --type csv --headerline --file calendar.txt | |
mongoimport --db <dbname> --collection routes --type csv --headerline --file routes.txt | |
mongoimport --db <dbname> --collection stoptimes --type csv --headerline --file stop_times.txt | |
mongoimport --db <dbname> --collection stops --type csv --headerline --file stops.txt | |
mongoimport --db <dbname> --collection trips --type csv --headerline --file trips.txt |
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
Autodesk Revit addins are generally loaded from the following locations. | |
User Addins: | |
%appdata%\Autodesk\Revit\Addins\ | |
Machine Addins (for all users of the machine): | |
C:\ProgramData\Autodesk\Revit\Addins\ | |
Addins packaged for the Autodesk Exchange store: | |
C:\ProgramData\Autodesk\ApplicationPlugins\ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>ThreeJS</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/110/three.min.js"></script> | |
<script src="https://threejs.org/examples/js/controls/OrbitControls.js"></script> | |
</head> | |
<body> |
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
// ref: https://stackoverflow.com/questions/7641791/javascript-library-for-human-friendly-relative-date-formatting | |
function fuzzyTime(date) { | |
var delta = Math.round((+new Date - date) / 1000); | |
var minute = 60, | |
hour = minute * 60, | |
day = hour * 24, | |
week = day * 7; |
OlderNewer