Skip to content

Instantly share code, notes, and snippets.

View blowsie's full-sized avatar
❤️
Vue Composition

Sam Blowes blowsie

❤️
Vue Composition
View GitHub Profile
@blowsie
blowsie / _tailwind_variables.scss
Created October 17, 2019 17:02
Tailwind Default Theme Variables in SCSS
$tw: (
screens: (
sm: 640px,
md: 768px,
lg: 1024px,
xl: 1280px
),
colors: (
transparent: transparent,
black: #000,
@blowsie
blowsie / dist-_variables.scss
Created October 17, 2019 16:00
convert-js to scss variables
$tw: (
screens: (
sm: 640px,
md: 768px,
lg: 1024px,
xl: 1280px
),
colors: (
transparent: transparent,
black: #000,
@blowsie
blowsie / _Foundation JS fixes for Bootstrap CSS
Last active October 31, 2017 09:04
Foundation JS fixes for Bootstrap CSS
/*
Two steps to get bootstrap css working with foundation
- Adding main overrides to bower.json
- Removing exclusions from conf/gulp.conf.js
*/
@blowsie
blowsie / glyphicon_font-awesome_convert.scss
Last active March 5, 2024 13:27
Map glyphicon icons to font-awesome
$fa-font-path: "~font-awesome/fonts";
@import '~font-awesome/scss/font-awesome';
.glyphicon {
@extend .fa;
&.glyphicon-asterisk {
@extend .fa-asterisk;
}
&.glyphicon-plus {
@extend .fa-plus;
@blowsie
blowsie / gist:aa9997be62e8fbc6a991878c62b51590
Created July 7, 2016 12:52 — forked from janbaer/gist:5045798
Convert CSV to Json with powershell
param
(
[string] $inputFile,
[string] $outputFile
)
if (($inputFile -eq $null) -or ($outputFile -eq $null)) {
"usage: convert_csv_to_json.ps1 [inputFile] [outputFile]"
return;
}
JSON.flatten = function (data) {
var result = {};
function recurse(cur, prop) {
if (Object(cur) !== cur) {
result[prop] = cur;
} else if (Array.isArray(cur)) {
for (var i = 0, l = cur.length; i < l; i++)
recurse(cur[i], prop + "[" + i + "]");
if (l == 0) result[prop] = [];
@blowsie
blowsie / web.config
Last active September 6, 2021 22:26
Prerender IIS Web.config
<?xml version="1.0"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-Prerender-Token" value="XXXXXXXXXXXXX" />
</customHeaders>
</httpProtocol>
<rewrite>
<rules>
@blowsie
blowsie / resursiveFind.js
Created March 25, 2013 14:03
Returns JSON OBJ and its parents based on a data set, key and match.
//#region function recursiveFind
function recursiveFind(data, key, childKey, match, result) {
///<summary>Returns JSON obj and its parents based on a data set, key and match.</summary>
///<param name="data" type="Object" optional="false">the data object you want to find within</param>
///<param name="key" type="String" optional="false">the key for the data you want to match against eg. 'id' will look for data.id</param>
///<param name="childKey" type="String" optional="false">the data object you want to find within</param>
///<param name="match" type="Any" optional="false">the data object you want to find within</param>
///<returns type="Object">returns the found result</returns>
@blowsie
blowsie / TextAreaExpander.js
Last active December 10, 2015 15:08
Auto expanding textarea element plugin
/*
* TextAreaExpander plugin for jQuery
* v1.0
* Expands or contracts a textarea height depending on the
* quatity of content entered by the user in the box.
*
* By Sam Blowes
*
* As featured on SitePoint.com:
* http://www.sitepoint.com/blogs/2009/07/29/build-auto-expanding-textarea-1/