Skip to content

Instantly share code, notes, and snippets.

View angrytoast's full-sized avatar

Gary Gao angrytoast

View GitHub Profile
{
"alignment_chars":
[
"=",
":"
],
"alignment_space_chars":
[
"=",
":"
@angrytoast
angrytoast / tedrss.xml
Created June 17, 2014 00:53
Ted Feed pretty print
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2enclosuresfull.xsl"?>
<?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:jwplayer="http://developer.longtailvideo.com/" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
<channel>
<lastBuildDate>Mon, 16 Jun 2014 10:48:19 UTC</lastBuildDate>
<title>TEDTalks (video)</title>
<link>http://www.ted.com/talks/list</link>
<generator>TED - TED.com</generator>
<description>TED is a nonprofit devoted to Ideas Worth Spreading. On this feed, you'll find TEDTalks video to inspire, intrigue and stir the imagination from some of the world's leading thinkers and doers, speaking from the stage at TED conferences, TEDx events and partner events around the world. T
source 'https://rubygems.org'
group :development do
# Sass, Compass and extensions.
gem 'sass' # Sass.
gem 'sass-globbing' # Import Sass files based on globbing pattern.
gem 'compass' # Framework built on Sass.
gem 'compass-validator' # So you can `compass validate`.
gem 'compass-normalize' # Compass version of normalize.css.
GEM
remote: https://rubygems.org/
specs:
addressable (2.3.6)
bourbon (3.2.3)
sass (~> 3.2)
thor
breakpoint (2.0.7)
compass (>= 0.12.1)
sass (>= 3.2.0)
@angrytoast
angrytoast / csscomb.sublime-settings
Last active August 29, 2015 14:11
Sublime CSS Comb
// Full list of supported options and acceptable values can be found here:
// https://github.com/csscomb/csscomb.js/blob/master/doc/options.md
{
"config": {
// Whether to add a semicolon after the last value/mixin.
"always-semicolon": true,
// Set indent for code inside blocks, including media queries and nested rules.
"block-indent": " ",
@angrytoast
angrytoast / ugh-english.js
Created December 24, 2014 06:39
JS string transform for english possessive
function(input) {
if(typeof input === 'string') {
input = input.trim();
input = (input.toLowerCase().slice(-1) === 's') ? input + "'" : input + "'s";
}
return input;
};
@angrytoast
angrytoast / 0_reuse_code.js
Last active August 29, 2015 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@angrytoast
angrytoast / translate.md
Last active August 29, 2015 14:12
OnTour Translation

OnTour Translation Starting point

  • /admin/tmgmt/sources

Translating Pages (this may mean both pages and field collections)

  • In general, pages will not have anything to translate beyond the title because everything should be in field_collection sections
  • The labels for standard pages can be confusing in the TMGMT interface, so it may be quicker to get the translation for the page title, and then update by hand.

Field Collections

  • /admin/tmgmt/sources
@angrytoast
angrytoast / grid.scss
Created January 12, 2015 19:18
grid.scss
.grid-1 {
@include span-columns(1, 4);
@include breakpoint($tablet) {
@include span-columns(1, 12);
}
}
.grid-2 {
@include span-columns(2, 4);
@include breakpoint($tablet) {
@angrytoast
angrytoast / ratio.scss
Last active August 29, 2015 14:13
ratio-content.scss
/*
Media Ratios
Media content can be locked to a certain ratio using a container / content
HTML structure and the classes below to change the persistent ratio. The ratio
defaults to 1:1
Markup:
<div class="ratio-lock grid-4 {$modifiers}">
<img class="ratio-content" src="//fillmurray.com/g/350/250">