Skip to content

Instantly share code, notes, and snippets.

View TaylorAckley's full-sized avatar

Taylor Ackley TaylorAckley

View GitHub Profile
@TaylorAckley
TaylorAckley / form.html
Last active October 19, 2015 19:31
Sexy Input Styling with CSS
<form class="myForm">
<input type="input" id="name">
</form>
@TaylorAckley
TaylorAckley / script.js
Created October 16, 2016 22:01 — forked from jbutko/script.js
#JS, #RegExp: How To Validate Password With Regular Expression
// 1. approach:
((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%]).{6,20})
/*
( # Start of group
(?=.*\d) # must contains one digit from 0-9
(?=.*[a-z]) # must contains one lowercase characters
(?=.*[A-Z]) # must contains one uppercase characters
(?=.*[@#$%]) # must contains one special symbols in the list "@#$%"
@TaylorAckley
TaylorAckley / fib.js
Created October 21, 2016 21:07
JS Excersises
//1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ...
function fibonacci(n) {
var a = 1;
var b = 0;
var temp;
while (n >= 0) {
temp = a;
a = a + b;
b = temp;
function arrCollection() {
this.createArray = function(len) {
var ret = [];
for(var i = 0; i < len; i++) {
ret.push(i);
}
return ret;
};
this.reduceToPrime = function(arr) {
var ret = arr.filter(function(value) {
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<!DOCTYPE html>
<html ng-app="scormify" ng-strict-di>
<head>
<base href="/">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
"use strict";
;(function() {
angular
.module('xxx')
.controller('HomeCtrl', HomeCtrl);
HomeCtrl.$inject = ['$scope', '$http', '$state', '$location', '$stateParams', 'LocalStorage', 'QueryService', 'Account', 'Videos', 'toastr'];
"use strict";
(function() {
angular.module('weatherApp')
.factory('weatherSvc', LocationSvc);
WeatherSvc.$inject = ['$q', '$window', '$http', 'CONSTANTS'];
function WeatherSvc($q, $window, $http, CONSTANTS) {
@TaylorAckley
TaylorAckley / zendesk.js
Created February 6, 2017 04:02
Retrieve all tickets from the Zendesk API.
"use strict";
const request = require('request');
const fs = require('fs');
const req = require('request-promise');
const async = require('asyncawait/async');
const await = require('asyncawait/await');
const appConfig = require('../config.js');
//hoist
"use strict";
//npm i express morgan body-parder method-override path cors moment request bluebird lodash --save
const express = require('express');
const app = express();
var server = require('http').createServer(app);
const morgan = require('morgan');
const bodyParser = require('body-parser');
const methodOverride = require('method-override');
"use strict";
const appConfig = require('../config.js');
const mongoose = require('mongoose');
mongoose.connect(appConfig.MONGOLAB_URI);
mongoose.connection.on('error', (err) => {
console.log('Error: Could not connect to MongoDB. Did you forget to run `mongod`?');
});
mongoose.connection.once('open', (err) => {
console.log('Connected to MongoDb');
});