Skip to content

Instantly share code, notes, and snippets.

View itsdevcoffee's full-sized avatar

Chris Pena itsdevcoffee

View GitHub Profile
import * as am4core from '@amcharts/amcharts4/core'
import * as am4maps from '@amcharts/amcharts4/maps'
import am4geodata_usaLow from '@amcharts/amcharts4-geodata/usaLow'
import am4themes_dark from '@amcharts/amcharts4/themes/dark'
import am4themes_animated from '@amcharts/amcharts4/themes/animated'
// Define global variables
let chart
document.addEventListener('DOMContentLoaded', () => {
function convert_state(name, to) {
var name = name.toUpperCase();
var states = new Array( {'name':'Alabama', 'abbrev':'AL'}, {'name':'Alaska', 'abbrev':'AK'},
{'name':'Arizona', 'abbrev':'AZ'}, {'name':'Arkansas', 'abbrev':'AR'}, {'name':'California', 'abbrev':'CA'},
{'name':'Colorado', 'abbrev':'CO'}, {'name':'Connecticut', 'abbrev':'CT'}, {'name':'Delaware', 'abbrev':'DE'},
{'name':'Florida', 'abbrev':'FL'}, {'name':'Georgia', 'abbrev':'GA'}, {'name':'Hawaii', 'abbrev':'HI'},
{'name':'Idaho', 'abbrev':'ID'}, {'name':'Illinois', 'abbrev':'IL'}, {'name':'Indiana', 'abbrev':'IN'},
{'name':'Iowa', 'abbrev':'IA'}, {'name':'Kansas', 'abbrev':'KS'}, {'name':'Kentucky', 'abbrev':'KY'},
{'name':'Louisiana', 'abbrev':'LA'}, {'name':'Maine', 'abbrev':'ME'}, {'name':'Maryland', 'abbrev':'MD'},
{'name':'Massachusetts',
@itsdevcoffee
itsdevcoffee / .js
Created June 18, 2019 19:08
mattisagoober
const getTimeObj = (date, seconds) => {
return new Date(date .getTime() + 1000*seconds);
}
const userList = {
'TexMex': {
timestamp,
message,
},
'userg42': {
var Pusher = require('pusher');
var pusher = new Pusher({
appId: '645212',
key: PUSHER_KEY,
secret: PUSHER_SECRET,
cluster: 'us2',
encrypted: true
});
<!DOCTYPE html>
<head>
<title>Pusher Test</title>
<script src="https://js.pusher.com/4.3/pusher.min.js"></script>
<script>
// Enable pusher logging - don't include this in production
Pusher.logToConsole = true;
var pusher = new Pusher('84e09133c83ec81132c9', {
{
"____comment": "This file was generated by eosio-abigen. DO NOT EDIT - 2018-06-06T20:57:09",
"version": "eosio::abi/1.0",
"types": [],
"structs": [{
"name": "lesson",
"base": "",
"fields": [{
"name": "id",
"type": "uint64"
@itsdevcoffee
itsdevcoffee / eos-dev-setup.md
Last active June 5, 2018 17:42
Shortcut to getting started with EOS Smart Contracts

Getting started with EOS Smart Contracts

There are two options that I'll go over for getting nodeos up and running.

  1. Docker (Recommended)
  2. Local Automated Build

Install Docker

Click here to install Docker

EOSIO Dev Docker image

Run the following commands:

@itsdevcoffee
itsdevcoffee / .js
Created January 16, 2017 07:13
Vue.js Tutorial - Posts
[
new Post(
'Vue.js',
'https://vuejs.org/',
'Chris',
'https://vuejs.org//images/logo.png'
),
new Post(
'React.js',
'https://facebook.github.io/react/',
@itsdevcoffee
itsdevcoffee / .css
Last active January 17, 2017 16:02
Vue.js Styles
html, body {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-top: 16px;
margin-bottom: 16px;
}
div#app {
User()
.Include(u => u.UserPreferences)
.Select(u => new ProfileVm {
FirstName = u.FirstName,
LastName = u.LastName,
Email = u.Email,
Phone = u.PhoneNumber,
UserPreferences = new UserPreferencesVm
{
IsTall = u.UserPreferences?.IsTall,