brew install mongodb
Set up launchctl to auto start mongod
$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
/usr/local/opt/mongodb/
is a symlink to /usr/local/Cellar/mongodb/x.y.z
(e.g., 2.4.9
)
/* | |
Make sure you are wearing the hr monitor, as it typically | |
goes to sleep when inactive, not allowing you to connect to it. | |
Instructions | |
============= | |
1. Using Google Chrome, open the dev console and paste the below code. | |
2. A panel near the address bar will open, searching for nearby bluetooth (ble) | |
heart rate devices. Don't click away from the panel or Chrome will cancel the search. |
import React, { memo, useReducer, useCallback } from 'react'; | |
import ReactDOM from 'react-dom'; | |
function random(max) { return Math.round(Math.random() * 1000) % max; } | |
const A = ["pretty", "large", "big", "small", "tall", "short", "long", "handsome", "plain", "quaint", "clean", | |
"elegant", "easy", "angry", "crazy", "helpful", "mushy", "odd", "unsightly", "adorable", "important", "inexpensive", | |
"cheap", "expensive", "fancy"]; | |
const C = ["red", "yellow", "blue", "green", "pink", "brown", "purple", "brown", "white", "black", "orange"]; | |
const N = ["table", "chair", "house", "bbq", "desk", "car", "pony", "cookie", "sandwich", "burger", "pizza", "mouse", |
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
--- | |
- name: Setup SBC | |
hosts: all | |
#become: true | |
#become_user: root | |
gather_facts: false | |
vars: | |
#New user to be created | |
new_user: newuser |
{ | |
"swagger": "2.0", | |
"info": { | |
"version": "v2", | |
"title": "Swagger API" | |
}, | |
"host": "{host}.zendesk.com", | |
"basePath": "/api/v2/", | |
"schemes": [ | |
"http" |
<?php | |
// set the output-file | |
$outputfile = "/var/www/nyt/nyt.jpg"; | |
// set path to todays NYT frontpage | |
$pathToPdf="https://static01.nyt.com/images/".date('Y')."/".date('m')."/".date('d')."/nytfrontpage/scan.pdf"; | |
// check if there is any today | |
$file_headers = @get_headers($pathToPdf); |
var CleanWordHTML = function ( str ) | |
{ | |
str = str.replace(/<o:p>\s*<\/o:p>/g, "") ; | |
str = str.replace(/<o:p>.*?<\/o:p>/g, " ") ; | |
str = str.replace( /\s*mso-[^:]+:[^;"]+;?/gi, "" ) ; | |
str = str.replace( /\s*MARGIN: 0cm 0cm 0pt\s*;/gi, "" ) ; | |
str = str.replace( /\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"" ) ; | |
str = str.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, "" ) ; | |
str = str.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"" ) ; | |
str = str.replace( /\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"" ) ; |
// METHOD #1 - More performant/preferred | |
/** | |
* Apollo Terminating link | |
* The split will skip Batching if an | |
* operation's context contains hasUpload: true | |
*/ | |
const httpLink = ApolloLink.split( | |
operation => operation.getContext().hasUpload, | |
createUploadLink(OPTS), |