Skip to content

Instantly share code, notes, and snippets.

View calindotgabriel's full-sized avatar
🦁
typing...

Calin Gabriel calindotgabriel

🦁
typing...
  • Endava
  • Cluj-Napoca
View GitHub Profile
@calindotgabriel
calindotgabriel / circles-d3.js
Last active January 23, 2020 09:50
Example of data binding on a circle, in D3
d3.csv('data/dogs.csv').then(data => {
data.forEach(d => d.age = +d.age);
const svg = d3.select('.playground')
.append('svg')
.attr('width', 600)
.attr('height', 600);
const circles = svg.selectAll('circle')
.data(data);
export const pageQuery = graphql`
query {
allWordpressWpApiMenusMenusItems {
edges {
node {
items {
title
url
}
}
#!/bin/sh
IMG_REGXP="<img"
HOME_PAGE_PATH="/Users/admin/Dev/pressed_site-develop/imports/plugins/custom/pressed-theme/client/templates/pages/home"
HOME_ANALYSIS_FILE="home_imgs.txt"
MEMBERSHIP_PAGE_PATH="/Users/admin/Dev/pressed_site-develop/imports/plugins/custom/pressed-theme/client/templates/pages/membership"
MEMBERSHIP_A_FILE="membership_imgs.txt"
ABOUT_PAGE_PATH="/Users/admin/Dev/pressed_site-develop/imports/plugins/custom/pressed-theme/client/templates/pages/about"
ABOUT_A_FILE="about_imgs.txt"
CELERY_PAGE_PATH="/Users/admin/Dev/pressed_site-develop/imports/plugins/custom/pressed-theme/client/templates/pages/celery-challenge"
// import * as cherryPieApi from "../lib/api";
const api = require("./api");
const MongoClient = require('mongodb').MongoClient;
const assert = require('assert');
// Connection URL
const url = 'mongodb://localhost:27017';
// Database Name
const dbName = 'default';
Attaching to pressed_site-develop_reaction_1
reaction_1 | npm info it worked if it ends with ok
reaction_1 | npm info using npm@4.6.1
reaction_1 | npm info using node@v4.8.4
reaction_1 | npm info attempt registry request try #1 at 8:48:18 AM
reaction_1 | npm http request GET https://registry.npmjs.org/fsevents
reaction_1 | npm http 304 https://registry.npmjs.org/fsevents
reaction_1 | npm info lifecycle reaction@1.5.3~preinstall: reaction@1.5.3
reaction_1 | npm info linkStuff reaction@1.5.3
reaction_1 | npm info lifecycle reaction@1.5.3~install: reaction@1.5.3
function EventEmitter () {
events = {}
function publish(type, payload) {
callbacks = events[type]
callbacks.forEach(c => {
c(payload)
})
}
import {Node} from './node';
export class BinarySearchTree {
constructor(root) {
this.root = root;
this.cmpFn = (l, r) => { return l - r; }; //cmp keys
}
get rootNode() {
@calindotgabriel
calindotgabriel / App.js
Created May 11, 2017 19:29
dishenumergewey.react.js
import React from 'react';
import NavigationBar from './NavigationBar';
class App extends React.Component {
render() {
return (
<div className="container">
<NavigationBar/>
{/*{this.props.children}*/}
const axios = require('axios');
const crypto = require('crypto');
const base64encode = (str) => { return new Buffer(str).toString('base64'); };
const md5hash = (str) => { return crypto.createHash('md5').update(str).digest('hex'); };
const ACCESS_KEY = "lhOqkkDQ5YDQPeXRntUd";
const SECRET_KEY = "AVY9eev3fDZaJCZvaemk";
const getApiRequestUrl = (url) => {