This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import React, { Component } from "react"; | |
import { Redirect, Route } from "react-router-dom"; | |
import CookieStorage from "./../services/CookieStorage"; | |
import type { Component as ComponentType } from "react"; | |
type Props = { | |
component: ComponentType<any, any> | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
const path = require("path"); | |
const pathDir = "C:/Users/Oscar/Downloads"; | |
const dirs = fs.readdirSync(pathDir); | |
dirs.forEach(async dir => { | |
const stats = await readStats(path.resolve(pathDir, dir)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.factory("$Link", function($q, $http){ | |
var LINKREGEX = /(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+ = &%@!\-\/]))?/g; | |
var YOUTUBEREGEX = /(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?v(?:i)?=|(?:embed|v|vi|user)\/))([^\?&\"'<> #]+)/; | |
var IMAGEREGEX = /(.+\w+\.(png|jpg|jpeg|ico|svg)$)/; | |
var SERVICE = "https://api.linkpreview.net"; | |
var KEY = "<api-key>"; | |
var $Link = {}; | |
/** | |
* Verifies if the provided text contains a link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = { | |
"id": "3", | |
"create_at": "2016-10-15 05:28:10", | |
"account": { | |
"username": "mgrantbt" | |
}, | |
"ticket": { | |
"status_id": "2" | |
}, | |
"amount": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var diet = require("diet"); | |
var app = diet(); | |
app.listen(8000); | |
require("./index.js")(app); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MySQL dump 10.13 Distrib 5.6.31, for debian-linux-gnu (x86_64) | |
-- | |
-- Host: localhost Database: tree | |
-- ------------------------------------------------------ | |
-- Server version 5.6.31-0ubuntu0.15.10.1 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
// Pass the userService to the app | |
angular | |
.module('y') | |
.factory('userService', userService); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
// Pass the accountsFactory to the app | |
angular | |
.module('y') | |
.factory('accountsFactory', accountsFactory); | |
// Define the accountsFactory | |
function accountsFactory($resource) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = angular.module("example", ["ngRestful"]); | |
// Define global domain for resource | |
app.config(["ngRestful", function($restful){ | |
$restful.setDomain("http://localhost/tree/server"); | |
}]); | |
app.controller("exampleController", ["$resource", function($resource){ | |
// Domain is already defined, accounts will be appended with the domain url | |
var resource = new $resource("accounts"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cy = cytoscape({ | |
container: document.getElementById("cy"), | |
elements: [ | |
// nodes | |
{data: {id: "a", name:"1"}}, | |
{data: {id: "b", name:"2"}}, | |
{data: {id: "c", name:"3"}}, | |
{data: {id: "d", name:"4"}}, | |
{data: {id: "e", name:"5"}}, | |
{data: {id: "f", name:"6"}}, |
NewerOlder