Skip to content

Instantly share code, notes, and snippets.

Remote Only

Daniel Ashcraft dashcraft

Remote Only
Block or report user

Report or block dashcraft

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
dashcraft / reduce
Created Nov 22, 2017
Reduce example
View reduce
const arr = ['a','aab','bbc','aass']
let newArr = arr.reduce(function (str, item) {
if (item.includes('a')) {
str = str + item;
return str;
}, '');
dashcraft / LinkedInComponent.ts
Created Jul 12, 2017
A component for linkedin Oauth rest api
View LinkedInComponent.ts
import { Component } from '@angular/core';
selector: 'LinkedInExample',
template: '<a [href]="url">LinkedIn</a>'
export class LinkedInExample{
client_id: String = 'InputYourStupidClientStringHere';
redirect_uri:String = encodeURI("http://localhost:5000/whateverthehell");
dashcraft / freecodecampObjPropLookup.js
Created Jun 11, 2017
sample solution for obj prop lookup
View freecodecampObjPropLookup.js
function lookUpProfile(firstName, prop){
// Only change code below this line
var match = contacts.filter(function(x){
return x.firstName == firstName;
dashcraft / example.js
Created Jan 30, 2017
Free code camp part 4, rounding out javascript
View example.js
const readline = require('readline');
const mike = readline.createInterface({
input: process.stdin,
output: process.stdout
// var person = function(personName,personAge){
// let name = personName;
// let age = personAge;
You can’t perform that action at this time.