Skip to content

Instantly share code, notes, and snippets.

View jchild3rs's full-sized avatar

James Childers jchild3rs

View GitHub Profile
@jchild3rs
jchild3rs / fizzbuzz.rs
Created September 20, 2023 01:25
rust fizz buzz
fn main() {
fizzbuzz(15);
}
fn fizzbuzz(n: i32) {
for i in 1..n {
if i % 3 == 0 && i % 5 == 0 {
println!("FizzBuzz");
} else if i % 3 == 0 {
println!("Fizz");
import "buffer";
import P from "parsimmon";
import { NextRequest, NextResponse } from "next/server";
/** State and city tokens are just letters */
const dashToken = P.string("-");
const slashToken = P.string("/");
const zipPrefixToken = P.regex(/zip-/i);
const zipToken = P.regex(/[\d]+/i);
const poiToken = P.string("/p");
@jchild3rs
jchild3rs / gist:470be49a4bc4caf3ca8a
Last active April 8, 2020 15:54
Hologram Gulp Plugin
/*
// Usage:
gulp.task('docs', function(cb) {
gulp.src('path/to/your/src')
.pipe(hologram(cb));
});
*/
var gulp = require('gulp'),
notify = require('gulp-notify'),
@jchild3rs
jchild3rs / Omniture
Last active September 7, 2017 05:30
Simple abstraction for working with Omniture
var O = (function() {
var account = s_account || '', // <== fill this in with default s_account
instance = s || s_gi(account);
/**
* Description
* @method init
* @return
*/
@jchild3rs
jchild3rs / SassMeister-input.scss
Created November 20, 2014 22:02
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
$fad-img--width: 940px; $fad-img--height: 724px; %inherit-font { color: #000; font-weight: normal; } .fad-landing__img { width: $fad-img--width; height: $fad-img--height; display: table; background-repeat: no-repeat; background-position: center; overflow: hidden; padding-top: 10px; .fad-landing__img__txt { display: table-cell; vertical-align: middle; padding: 120px 0 0 80px; p { @extend %inherit-font; } ul { margin: -15px 0 0 30px; line-height: 120%; & li { @extend %inherit-font; } } } }
@jchild3rs
jchild3rs / SassMeister-input.scss
Created November 20, 2014 21:59
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
.bem {
&__element {
color: red;
}
&--tall {
@jchild3rs
jchild3rs / SassMeister-input.scss
Created November 12, 2014 20:05
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
// dude...lik
$var: 2px;
$doubled: $var * 2;
$divided: $var / 2;
@jchild3rs
jchild3rs / SassMeister-input.scss
Created November 12, 2014 19:30
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
// dude...lik
$var: 2px;
$doubled: $var * 2;
.foo {
@jchild3rs
jchild3rs / gist:dc31a70fac76e9c4bd24
Created October 20, 2014 18:34
Mixin vs directly using $
.form {
@include e(field) {}
@include m(inline) {}
}
// or...
.form {
&__field {}
&--inline {}
}
@jchild3rs
jchild3rs / SassMeister-input.scss
Created August 18, 2014 19:04
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.0.rc.1)
// ----
.blocker {
@at-root &__item{
text-align: left
}
&--mo{