Skip to content

Instantly share code, notes, and snippets.

View scottsword's full-sized avatar

Scott Sword scottsword

  • PlexTrac
  • Boise, ID
View GitHub Profile
@scottsword
scottsword / gist:38cf425d3b6a0dfbf113
Last active August 29, 2015 14:18
Contrived for loop
var rebels = ['Wedge', 'Leia', 'Luke', 'Han'];
for (var i = 0; i < rebels.length; i ++) {
if (rebels[i] === 'Luke') {
console.log('I have you now.');
}
}
@scottsword
scottsword / gist:5e04bc3e8b2ca413f82b
Last active October 23, 2015 12:02
Old App Structure from Angular Seed Project
app.js
/controllers
dashboard.controller.js
profile.controller.js
/directives
modal.directive.js
/services
api.serivce.js
/views
dashboard.html
@scottsword
scottsword / gist:ee14e1615a71dc90212e
Created October 23, 2015 12:01
Component Based Structure
app.module.js
/components
/dashboard
dashboard.controller.js
dashboard.html
/profile
profile.controller.js
profile.html
/shared
/modal
@scottsword
scottsword / gist:f067454fba6da8fbbe05
Last active November 10, 2015 18:18
App-Based Structure
/project
app.module.js
/dashboard-app
dashboard.module.js
dashboard.controller.js
dashboard.controller.spec.js
dashboard.html
/profile-app
profile.module.js
profile.controller.js
$urlRouterProvider.otherwise('/');
$stateProvider
.state('dashboard', {
url: '/',
templateUrl: 'dashboard-app/dashboard.html?cache-bust="' + cacheBusterProvider.tag() + '"',
controller: 'DashboardController',
controllerAs: 'vm',
resolve: {
data: function(authService) {
@scottsword
scottsword / .screenrc
Created August 23, 2016 17:40 — forked from joaopizani/.screenrc
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@scottsword
scottsword / schedule-factory.js
Created October 21, 2016 15:44
Little underscore-based schedule service.
(function() {
'use strict';
function scheduleFactory($log, $q, events) {
/*
* NOTE: This method organizes the list of event data
* into a nested list for schedule iteration.
* Days > Times > Events
#!/bin/bash
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
export NVM_DIR="/Users/$USER/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm --version
nvm install
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
export PATH="$PATH:`yarn global bin`"
yarn --version
{
"name": "TSheets_Frontend",
"version": "0.1.0",
"private": true,
"homepage": "https://www.tsheets.com",
"devDependencies": {
"autoprefixer": "6.5.1",
"babel-core": "6.17.0",
"babel-eslint": "7.1.1",
"babel-jest": "17.0.2",
@scottsword
scottsword / ._sys.js
Last active December 8, 2017 22:24
cron prank
// Cron info
// Open cron
// crontab -e
//
// Pattern Every 5 minutes
// */5 * * * command
//
// list crons
// crontab -l