Skip to content

Instantly share code, notes, and snippets.

@chaseadamsio
chaseadamsio / Gruntfile.js
Last active Mar 19, 2016
Grunt Up & Running from Using Grunt For A Better Workflow.
View Gruntfile.js
'use strict';
var packagejson = require('./package.json');
module.exports = function (grunt) {
// Configuration
grunt.initConfig({
pkg: packagejson,
watch: {
scripts: {
View sample-grunt.js
grunt.event.on('watch', function (action, path, target) {
if (target === 'html' || target === 'css' /* and on and on for your target types in watch */) {
grunt.config(['clean', 'any'], []);
// Making an assumption your using sftp and have a current working directory setup
cwd = grunt.config.get(['sftp', 'cwd']) + '/';
path = path.replace(cwd, '');
grunt.config(['sftp', 'options', 'path'], path);
}
});
View standup.md

Proposed Standup Style

Standup is an opportunity for us to sync up as a team, on the daily, so that we are aware of what others are working on as it relates to us as individuals as well as to the team.

Why Slack Standup?

Due to the "spread" of our team, Slack standup allows us to asynchronously communicate our objectives to the team without anyone missing information. It also provides us with documentation on what we're planning and how much we have achieved.

Overall, it's a great way for us to make sure everyone is on the same page, regardless of whether they were out for the day, during standup or want to reference to make sure we're not duplicating or blocking work.

View grunt-jshint-task.js
grunt.initConfig({
// ...other plugins
jshint: {
files: [
'Gruntfile.js',
'cookiejar.js',
'test/*.js'
]
}, // ...other plugins
});
@chaseadamsio
chaseadamsio / consoleTable.js
Last active Dec 28, 2015
Run it in your console!!!
View consoleTable.js
var developerz = [
{ name: "Chase", masterOf: "Learning New Things" },
{ name: "Nate", masterOf: "The Rubies" },
{ name: "Brandon", masterOf: "Javascript" },
// Cache Rules Everything Around Me...
{ name: "Ryan", masterOf: "C.R.E.A.M." },
{ name: "Brian", masterOf: "All the things!" }
];
console.table(developerz);
@chaseadamsio
chaseadamsio / Gruntfile.js
Created Nov 12, 2013
My Gruntfile for realchaseadams.com
View Gruntfile.js
// Generated on 2013-08-07 using generator-jekyllrb 0.3.6. Yo Jekyll!
'use strict';
var liveReloadPort = 35729;
var packagejson = require('./package.json');
var lrSnippet = require('connect-livereload')({port: liveReloadPort});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
var yeomanConfig = {
pkg: packagejson,
View index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Solution</title>
<link rel="stylesheet" href="css/style.css">
<link rel="author" href="humans.txt">
</head>
@chaseadamsio
chaseadamsio / reverso.py
Last active Dec 26, 2015
[python response] Here's the solution I came up with for this interview question on interviewcake.com: "Write a function to reverse a string in place. 'In place' means 'without creating a new string in memory.'" http://www.interviewcake.com/question/reverse-string-in-place
View reverso.py
import sys
def reverso(str):
i = 0
str_len = len(str) - 1
str = list(str)
half_len = len(str)/2
for x in str:
temp = x
@chaseadamsio
chaseadamsio / reverso.rb
Last active Dec 25, 2015
Here's the solution I came up with for this interview question on interviewcake.com: "Write a function to reverse a string in place. 'In place' means 'without creating a new string in memory.'" http://www.interviewcake.com/question/reverse-string-in-place
View reverso.rb
# `ruby reverso.rb "foo"`
class Reverso
def initialize
my_arr = ARGV[0].split("")
puts "'#{self.reverso(my_arr)}'"
end
def reverso my_arr
len = my_arr.size - 1
halflen = ((len + 1)/2.0).ceil
@chaseadamsio
chaseadamsio / parenthetical-solution.js
Last active Dec 25, 2015
Here's the solution I came up with for this interview question on interviewcake.com: "I like parentheticals (a lot). "Sometimes (when I nest them (my parentheticals) too much (like this (and this))) they get confusing." Write a function that, given a sentence like the above, along with the position of an opening parenthesis, finds the correspond…
View parenthetical-solution.js
// I enjoy doing interview questions just because they make my brain feel better.
// Here's the solution I came up with for this interview question on interviewcake.com
// http://www.interviewcake.com/question/matching-parens
var str = 'Sometimes (when I nest them (my parentheticals) too much (like this (and this))) they get confusing.';
findMyMate(str, '(', ')', 10);
/**
* Find the mate of a given character