Skip to content

Instantly share code, notes, and snippets.

{
"name": "rogers",
"private": true,
"version": "0.1.0",
"description": "The team",
"author": "Transfix Engineering <tech@transfix.io>",
"email": "tech@transfix.io",
"engines": {
"node": "v14.18.0",
"npm": "9.6.5"
@xlozinguez
xlozinguez / hr-service-2.ts
Last active December 19, 2017 17:33
GATT flow
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { BluetoothCore } from '@manekinekko/angular-web-bluetooth';
@Injectable()
export class HeartRateService {
static GATT_CHARACTERISTIC_HR_MEASUREMENT = 'heart_rate_measurement';
static GATT_PRIMARY_SERVICE = 'heart_rate';
<svg id="shotChart-02-svg" style="height: 100%; width: 100%; overflow: visible;" preserveAspectRatio="xMinYMax meet" viewBox="0 0 590 120"><defs><radialGradient cx="0" cy="0" r="5" id="radialGradientSij1i6j9n2c"><stop offset="0%" stop-color="#d56900"></stop><stop offset="100%" stop-color="#000000"></stop></radialGradient><radialGradient cx="0" cy="0" r="5" id="radialGradientSij1i6j9n2t"><stop offset="0%" stop-color="#d56900"></stop><stop offset="100%" stop-color="#000000"></stop></radialGradient><radialGradient cx="0" cy="0" r="5" id="radialGradientSij1i6j9n3a"><stop offset="0%" stop-color="#d56900"></stop><stop offset="100%" stop-color="#000000"></stop></radialGradient><radialGradient cx="0" cy="0" r="5" id="radialGradientSj02pz5cnk"><stop offset="0%" stop-color="#d56900"></stop><stop offset="100%" stop-color="#000000"></stop></radialGradient><radialGradient cx="0" cy="0" r="5" id="radialGradientSj02pz5cnt"><stop offset="0%" stop-color="#d56900"></stop><stop offset="100%" stop-color="#000000"></stop></radial
import { Injectable } from '@angular/core';
@Injectable()
export class DomHandler {
public static zindex: number = 1000;
public addClass(element: any, className: string): void {
if (element.classList)
element.classList.add(className);
@xlozinguez
xlozinguez / SassMeister-input.scss
Created January 10, 2017 19:47 — forked from jlong/SassMeister-input.scss
Navigate a nested maps with map-fetch() in Sass
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
//
// map-fetch($map, $keys)
//
// An easy way to fetch a deep value in a multi-level map. Works much like
// map-get() except that you pass multiple keys as the second parameter to
import { TestBed, inject } from '@angular/core/testing';
import { FakeBackend } from 'ngx-http-test';
import { Observable } from 'rxjs/Observable';
import { CompanyApiService } from './company.api.service';
import { company_mock } from 'assets/mock-data/company.mock';
import { company_offices_mock } from 'assets/mock-data/company-offices.mock';
import { company_projects_mock } from 'assets/mock-data/company-projects.mock';
import { company_transactions_mock } from 'assets/mock-data/company-transactions.mock';
Motto: The best way to learn is to teach
[ ] Master
[ ] Algorithms
[ ] ng2
[ ] TypeScript
[ ] RxJS / Redux
[ ] Teach
[ ] Publish 50 Blog entries
[ ] Lead 20 Lunch n Learn
{
"stocks": [{
"id": 1,
"name": "Novavax NVAX",
"ticker": "NVAX"
}, {
"id": 2,
"name": "Array ARRY",
"ticker": "ARRY"
}, {
@xlozinguez
xlozinguez / api.js
Created February 26, 2016 01:03
Axial Events Express API
var express = require('express');
var app = express();
app.use(express.bodyParser());
var events = [{
"id": 0,
"title": "Atlanta Summit 2016",
"date": "February 9th, 2016",
"img": "http://www.axial.net/wp-content/uploads/2015/12/Atlanta-Summit-hero-image.jpg"
}, {
@xlozinguez
xlozinguez / user_serializer
Created April 17, 2013 18:08
Serializer example
class UserSerializer < ActiveModel::Serializer
attributes :id,
:email,
:name,
:username,
:location,
:description,
:avatar_url,
:trainer_id,
:created_at,