This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Written almost entirely by ChatGPT O_O | |
# Variables | |
BEARER_TOKEN="your_bearer_token" | |
SOUNDBAR_DEVICE_ID="your_soundbar_device_id" | |
PREFERRED_SOUND_MODES=("adaptive sound+" "adaptive sound" "surround" "standard") | |
VERBOSE=0 | |
SILENT=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The luminance function requires some math functions be added to sass as shown below | |
@function luminance($color) { | |
// Formula: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef | |
$rgba: red($color), green($color), blue($color); | |
$rgba2: (); | |
@for $i from 1 through 3 { | |
$rgb: nth($rgba, $i); | |
$rgb: $rgb / 255; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Stick all your icons in a subfolder in your images folder. Put retina versions in a subfolder of that called "@2x". | |
$sprites: sprite-map("NAME_OF_SUBFOLDER/*.png"); | |
$sprites2x: sprite-map("NAME_OF_SUBFOLDER/@2x/*.png"); | |
// stolen from 37signals | |
@mixin retina-media() { | |
@media (min--moz-device-pixel-ratio: 1.3), | |
(-webkit-min-device-pixel-ratio: 1.3), | |
(min-device-pixel-ratio: 1.3), | |
(min-resolution: 1.3dppx) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Inspired by this post from CSS-Tricks. | |
// http://css-tricks.com/snippets/css/less-mixin-for-rem-font-sizing/ | |
// | |
// Plays nice with compass/typography/vertical_rhythm | |
// http://compass-style.org/reference/compass/typography/vertical_rhythm/ | |
// | |
// Calculates font size in `rem` (root em). | |
// | |
// Relative values depends on $base-font-size. Pixle value for font-size depends | |
// on $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Media Queries in Sass 3.2 | |
// | |
// These mixins make media queries a breeze with Sass. | |
// The media queries from mobile up until desktop all | |
// trigger at different points along the way | |
// | |
// And important point to remember is that and width | |
// over the portrait width is considered to be part of the | |
// landscape width. This allows us to capture widths of devices | |
// that might not fit the dimensions exactly. This means the break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tutorial for compiling the Compass.app (http://compass.handlino.com/) | |
===================================================================== | |
Java installed? | |
java -version | |
Load jRuby (for example JRuby 1.6.5.1 Binary .zip) | |
http://jruby.org/download | |
Unzip jRuby to `/usr/local/` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(window).load(function(){ | |
$().hatchShow(); | |
}); | |
jQuery.fn.hatchShow = function(){ | |
$('.hsjs').css('display','inner-block').css('white-space','pre').each(function(){ | |
var t = $(this); | |
t.wrap("<span class='hatchshow_temp' style='display:block'>"); | |
var pw = t.parent().width(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mixins --------------------------------------------------------------- | |
=placeholder-style | |
color: #777 | |
// add your defaults here. | |
// if you need more than one style-group you can either create several mixins, | |
// or just name the style-groups and take a single style-group-name argument. | |
=apply-placeholders | |
&::-webkit-input-placeholder |