Skip to content

Instantly share code, notes, and snippets.

View CharlesAMoss's full-sized avatar
💭
200

Charlie Moss CharlesAMoss

💭
200
View GitHub Profile
@CharlesAMoss
CharlesAMoss / es6_fizzbuzz.txt
Last active February 29, 2016 08:11
fizzbuzz es6 plus .map
const myArray = [1,2,3,4,5,6,7,8,9,10,15];
let zed = z => (z % 3 === 0 && z % 5 === 0) ? "fizzbuzz" :
(z % 3 === 0 ) ? "fizz" :
(z % 5 === 0 ) ? "buzz" :
z;
console.log(myArray.map(zed)); // [1,2,"fizz",4,"buzz","fizz",7,8,"fizz","buzz","fizzbuzz"]
// transpiled with babeljs ver 5.x
@CharlesAMoss
CharlesAMoss / jokes
Created September 27, 2015 04:19
these are the jokes
var x = "great sadness";
var great_magic = function ( str ) {
var result = str.replace(new RegExp(("\\b" + "sadness" + "\\b"), 'g'), "happiness");
return result;
};
console.log(great_magic(x)); // logs "great happiness"
@CharlesAMoss
CharlesAMoss / card-design
Created June 13, 2015 02:14
example code for card design
/* These styles correspond to card.rb from github.com/CharlesAMoss/ruby-tools */
*, *:before, *:after {
box-sizing: border-box;
}
body {
background: #f9f9f9;
color: #000;
@CharlesAMoss
CharlesAMoss / index.html
Created August 10, 2013 02:35
A CodePen by charlie. clock widget - Clock Widget ------------ HTML CSS SASS(SCSS) JavaScript SVG *inspiration* dribbble rebound of MVben's design http://dribbble.com/shots/1145537-Plug-In1 *nuts and bolts* http://blog.stevenlevithan.com/archives/date-time-format http://stackoverflow.com/questions/1531093/how-to-get-current-date-in-javascript ht…
<!--
dribbble rebound of MVben's design http://dribbble.com/shots/1145537-Plug-In1
-->
<div class="main">
<div class="nav">
<ul>
<li class="al">Alarms</li>
<li class="sw">Stopwatch</li>