Skip to content

Instantly share code, notes, and snippets.

View BuddyLReno's full-sized avatar
🍄
Waluigi is my homie.

Buddy Reno BuddyLReno

🍄
Waluigi is my homie.
View GitHub Profile
@BuddyLReno
BuddyLReno / AngularExample.html
Last active September 11, 2017 12:23
Sass Nesting
<Episodes>
<h2 class="title">My Title</h2>
</Episodes>
@BuddyLReno
BuddyLReno / insert-parent.scss
Created July 11, 2017 12:06
Mixin to insert class inside parent selector.
@mixin insertParent($class, $append: false) {
$selString: quote(&);
$parent: str-slice($selString, 0, str-index($selString, " ") - 1);
$minusParent: str-slice($selString, str-index($selString, " ") + 1);
$firstChild: str-slice($minusParent, 0, str-index($minusParent, " ") - 1);
$otherChildren: str-slice($selString, str-index($selString, $firstChild) + str-length($firstChild) + 1);
$selector: unquote("");
@if $append {
$selector: $parent #{$firstChild}#{$class} $otherChildren;
@BuddyLReno
BuddyLReno / iecheck.js
Created September 14, 2016 02:25
Detect IE with a short if check.
if(/*@cc_on!@*/false || !!document.documentMode) {
document.querySelector('html').className += " is-IE";
}
@BuddyLReno
BuddyLReno / animation2.scss
Created August 22, 2016 13:56
Specified Units
@keyframes bounce {
from {
transform: translateY(0);
}
to {
transform: translateY(18px);
}
}
@BuddyLReno
BuddyLReno / animation.scss
Created August 22, 2016 13:53
Keyframe Animation
.arrow {
animation: arrow-bounce 1s ease-in-out infinite alternate;
}
@keyframes arrow-bounce {
from {
transform: translateY(0);
}
to {
transform: translateY(1rem);
@BuddyLReno
BuddyLReno / workflow.rb
Created July 23, 2015 19:17
Aflred Weekly Report Workflow
require 'fileutils'
require 'date'
# {query} is the user input from Alfred. Not used in this particular script.
query = "{query}"
firstDay = Date.parse("25-02-2013")
report_source_dir = "#{Dir.home}/Dropbox/Lampo/Weekly Reports/#{Date.today.year}/MD Source/"
vol = ((Date.today.year * 12 + Date.today.month) - (firstDay.year * 12 + firstDay.month)) / 12 + 1
@BuddyLReno
BuddyLReno / SassMeister-input.scss
Last active August 29, 2015 14:23
Generated by SassMeister.com.
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
.SpeakerList {
$baseComponent: &;
$compactComponent: selector-append($baseComponent, --compact);
&-image {
@BuddyLReno
BuddyLReno / getUrlParameter.js
Last active August 29, 2015 14:21
Finds query string parameters and returns them.
function getUrlParameter(parameterName) {
var results = new RegExp('[\?&amp;]' + parameterName + '=([^&amp;#]*)').exec(window.location.search);
if (results === null) {
return "";
} else {
return results[1] || "";
}
};
@BuddyLReno
BuddyLReno / ex1.css
Created April 22, 2015 19:11
Sass Theme Engine Blog
.post__title,
.post__subtitle {
color: black;
}
.theme--forest .post__title {
color: forestgreen;
}
.theme--forest .post__subtitle {
@BuddyLReno
BuddyLReno / SassMeister-input.scss
Created March 4, 2015 13:54
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
//Generator
@mixin theme-generator(
$post__title: "",
$post__subtitle: ""
) {