Skip to content

Instantly share code, notes, and snippets.

🍄

David A. Viramontes dviramontes

🍄
Block or report user

Report or block dviramontes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View App.tsx
import App from './App';
import React from 'react';
import ReactDOM from 'react-dom';
import './utils/styles/global-styles.css';
import * as serviceWorker from './services/serviceWorker';
const ws = new WebSocket("ws://0.0.0.0:4000/ws")
ws.onopen = () => {
// connected
View gist:b50318c23b0f19b541777d8a9c6e7863
<div className='ui container assets'>
<div className='ui row'>
{ loading ?
<Loading /> :
<table className='ui padded table'>
<thead>
<tr>
<th>Asset</th>
<th>Platform</th>
<th>KeepKey</th>
View cmd-args.go
// print name of calling program,
// list args passed each on a new line,
// print time elapsed
package main
import (
"fmt"
"os"
"strings"
@dviramontes
dviramontes / flattenArray.js
Created Sep 10, 2017
flatten array of arbitrary length
View flattenArray.js
function flattenArray(arr) {
return arr.reduce((acc, e) => {
if(Array.isArray(e)){
return acc.concat(flattenArray(e));
}
acc.push(e);
return acc;
}, []);
}
@dviramontes
dviramontes / README.md
Last active Jul 15, 2017
running with scissors and exercism
View README.md

Hi!!!

Lets get you setup with exercism.io

STEPS:

  1. Let's check you NPM version: npm -v if version> 5; we're are good to go, skip to step 2

  2. else: let's update the npm!

View index.html
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[p5.js]" />
<meta charset="utf-8">
<title>JS Bin</title>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.8/processing.min.js"></script>
</head>
<body>
<canvas id="canvas1" width="200" height="200" border="1"></canvas>
View index.html
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[p5.js]" />
<meta charset="utf-8">
<title>JS Bin</title>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.8/processing.min.js"></script>
</head>
<body>
<canvas id="canvas1" width="200" height="200" border="1"></canvas>
@dviramontes
dviramontes / res.json
Created Jul 18, 2016
contentful management response
View res.json
[
{
"sys": {
"publishedAt": "2016-06-22T03:52:38.355Z",
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "2efkk6oex1yh"
}
View gist:af095e60bf0986671d7d
// register these two event listeners
window.player.on("play", function(){ console.log("played")});
window.player.on("pause", function(){ console.log("paused")});
@dviramontes
dviramontes / example-input-range.cljs
Last active Nov 9, 2015
input-range-component-state-transition-example
View example-input-range.cljs
(ns rmfu-ui.profile
(:require
[reagent.core :as reagent :refer [atom]])) ;; <--- special version of the atom here, rerenders componets on change
(defn input-range-component
[state param]
[:div.row
[:p.bullet.col-lg-7
"Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."]
[:p.col-lg-5
You can’t perform that action at this time.