Skip to content

Instantly share code, notes, and snippets.

View newbreedofgeek's full-sized avatar
😖
web3 anyone?

Mark Paul newbreedofgeek

😖
web3 anyone?
View GitHub Profile
@newbreedofgeek
newbreedofgeek / gist:5493787
Last active December 16, 2015 20:39
Sample JSON for quotes - [14:50] <@wohali> So you may want to consider a different data model. [14:50] <@wohali> I can figure out a way to search on all *documents* in a database that have an item with "cat":"determination" [14:50] <@wohali> but the view won't return the individual items necessaryily. [14:50] <@wohali> necessarily* [14:51] <newb…
{
"_id":"quotes_1319238143",
"_rev":"5-0eda6079e7e6e8f23dd2e0a00b5f2c75",
"items":
[
{
"date":1357879144069,
"text":"don't cry because it's over, smile because it happened.",
"author":"dr. seuss",
"style":3,
@newbreedofgeek
newbreedofgeek / gist:7885006
Created December 10, 2013 02:48
A example of how we need to create an instance of a reusable UI Component.
// E.g of a listItem Class
function listItem(text, onSelectFunc) {
this.text = text;
this.onSelect = function() {
console.log('I am selected');
}
}
// E.g Collection of listItems
var listItems = [];
@newbreedofgeek
newbreedofgeek / make_build_using_package_json
Last active January 23, 2017 16:34
This is a simple Shell Script that you can include in your project that will use the name and version values from your package.json and create a tar.gz build for you. Useful for manual builds where you need to copy your app to your server, unpack and launch.
#!/bin/bash
# Generate a tar.gz build using name and version from package.json
# In your app root you need a builds/ directory, this is where your tar.gz file will be placed. Or change this location in line 25
# The script will ignore your node_modules and builds folders
# get app name from package.json
name=`grep "name" package.json | sed 's/,//g'`
name=`sed 's/"name"://g' <<< $name`
name=`sed 's#"# #g' <<< $name`
@newbreedofgeek
newbreedofgeek / gist:50cb3f642d9b1865aa8f8e9867cd4c04
Last active July 17, 2016 01:52
Particle Core Debug Log - 1
// The core was plugged into the gateway. I then powered up (USB to Core) directly and took this below log.
// I waited for 2 mins but LED didnt change pattern and cant claim it in the console.bluz.com (It says "No Gateway Detected Yet")
// https://vine.co/v/5ZumqWx1Drx (video of the LED blinking and not changing)
3146:DEBUG: STARTING!
42780:DEBUG: In SPI Receive
42783:DEBUG: Handshake complete
42788:DEBUG: Receiving SPI data of size 6
42793:DEBUG: Reading chunk of size 6
@newbreedofgeek
newbreedofgeek / gist:90fcb177f2525972736f83561c0e6919
Created August 4, 2016 10:36
gateway_not_working_after firmware_flash
markpaul@Marks-MacBook-Pro ~> particle serial monitor
Opening serial monitor for com port: "/dev/cu.usbmodem1411"
3295:DEBUG: STARTING!
42612:DEBUG: In SPI Receive
42615:DEBUG: Handshake complete
42621:DEBUG: Receiving SPI data of size 6
42625:DEBUG: Reading chunk of size 6
42632:DEBUG: Processing message of size 3 with clientID 0 and service ID 1
42639:DEBUG: Disconnecting Client0
42643:DEBUG: Read length = 1
// Gateway done not boot and connect
// Had an issue with firmware and did a factory reset but now it does nto connect anymore
// here is what is happening:
// https://vine.co/v/5qwMLqKuw79
Last login: Sat Aug 6 20:23:27 on console
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
markpaul@Marks-MacBook-Pro ~> particle serial monitor
Opening serial monitor for com port: "/dev/cu.usbmodem1411"
@newbreedofgeek
newbreedofgeek / gist:82561303ef5abae90b0fafbf2c640a6f
Created August 29, 2016 20:51
Gateway resetting after connecting to BP meter
33015:DEBUG: Asking for id
33015:DEBUG: Starting to send data
33065:DEBUG: Completed Sending
33067:DEBUG: In SPI Receive
33067:DEBUG: Handshake complete
33069:DEBUG: Receiving SPI data of size 16
33069:DEBUG: Reading chunk of size 16
33072:DEBUG: Processing message of size 13 with clientID 3 and service ID 2
33072:DEBUG: Info data service with command 177
33072:DEBUG: You're gateway ID is b1e231533df17baa9acd15c2
@newbreedofgeek
newbreedofgeek / index.html
Created December 14, 2016 04:54 — forked from anonymous/index.html
JS Bin Type Conversion JavaScript Test Question // source http://jsbin.com/bopiji
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Type Conversion JavaScript Test Question">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>