Skip to content

Instantly share code, notes, and snippets.

$grid__width--300: 100 - ($grid__gutter-width--300 * 2);
$grid__width--400: 100 - ($grid__gutter-width--400 * 2);
$grid__width--500: 100 - ($grid__gutter-width--500 * 2);
$grid__width--600: 100 - ($grid__gutter-width--600 * 2);
$grid__width--700: 100 - ($grid__gutter-width--700 * 2);
$grid__gutter-width--300: 2.8vw * 2;
$grid__gutter-width--400: 2vw * 2;
$grid__gutter-width--500: 1.6vw * 2;
$grid__gutter-width--600: 1.2vw * 2;
$grid__gutter-width--700: 0.8vw * 2;
@coltpini
coltpini / Byte.swift
Created August 16, 2016 05:39
Swift Playgrounds ultimate code
func act(array:[String]){
for action in array[0..<array.count]{
var num:Int = 0;
var arr:Array = Array(action.characters);
if(arr.count > 1){
num = Int("\(arr[1])") ?? 0;
}
switch arr[0]{
case "f":
for i in 0...num {moveForward()}
@coltpini
coltpini / css-var-2.css
Last active September 29, 2016 18:34
Contrived example of dynamic scoped variables.
:root {
/* blue */
--color: #69f;
}
span {
color: var(--color);
}
span:hover {
@coltpini
coltpini / css-var-1.css
Last active September 29, 2016 18:35
CSS Variables first
:root {
--blue: #69f;
}
span {
color: var(--blue);
}
var myfunction = function(){
var someVar = "billy",
someOtherVar = "jimmy",
someVarThatIWillUse, anotherOne;
someVarThatIWillUse = "futureJimmy";
// do stuff;
};
const varExample = () => {
if(true){
var billy = `billy`;
}
console.log(`var: ${billy}`);
}
const letExample = () => {
if(true){
let billy = `billy`;
const varExample2 = () => {
for(var i=0; i<2; i++){
console.log(`var in loop i: ${i}`);
}
console.log(`var outside the loop loop i: ${i}`);
};
const letExample2 = () => {
for(let i=0; i<2; i++){
console.log(`let in loop i: ${i}`);
const varExample4 = () => {
for(var i=0; i<10; i++){
setTimeout(() => {
console.log(`in var loop with timeout: ${i}`);
}, 200);
}
};
const letExample4 = () => {
for(let i=0; i<10; i++){
@coltpini
coltpini / const.js
Last active November 12, 2016 17:33
const billy = "billy";
billy = "bob"; //(will throw an error)