Skip to content

Instantly share code, notes, and snippets.

@srsgores
srsgores / checkboxable-array.coffee
Created November 26, 2014 20:45
mixin used for checkboxable array
CheckboxableArrayMixin = Ember.Mixin.create
allSelected: false
selectedItems: Ember.computed.filterBy("", "selected", true)
selectedItemsCount: Ember.computed.alias("selectedItems.length")
isEmpty: Ember.computed.not(@get("model"))
@srsgores
srsgores / ajaxify-html5.js
Created August 11, 2012 08:33 — forked from balupton/README.md
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
// https://gist.github.com/854622
(function(window,undefined){
// Prepare our Variables
var
History = window.History,
$ = window.jQuery,
document = window.document;
// Check to see if History.js is enabled for our Browser
@srsgores
srsgores / folding.mixin.less
Created August 26, 2012 22:37
Dynamic Fold LESS Generation
.setColumnWidths(@maxcolumns, @num_cols, @min_resolution){
@media screen and(min-width: @min_resolution) {
.row {
.onecol {
width: percentage(~`Math.min(1, (1 / @{num_cols}*Math.ceil(@{num_cols}*1/@{maxcolumns})))`);
}
.twocol {
width: percentage(~`Math.min(1, (1 / @{num_cols}*Math.ceil(@{num_cols}*2/@{maxcolumns}))) `);
}
.threecol {
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>C# Unit Test Method</Title>
<Shortcut>testmethod</Shortcut>
<Description>Code snippet for creating an NUnit unit test in C#</Description>
<Author>Sean Goresht</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
@srsgores
srsgores / flexbox-helpers.styl
Created November 7, 2014 07:21
Helpers for flexbox
flex()
-webkit-box-flex arguments[0]
-webkit-flex arguments
-moz-box-flex arguments[0]
-ms-flex arguments
flex arguments
$display-flex
display -webkit-box
display -webkit-flex
@srsgores
srsgores / less_headers.less
Last active December 11, 2015 09:59
less recursive headers
@em: 1em;
@multiplierLarge: 2.3;
@multiplier: 2;
.headingsX(@index) when (@index > 0) {
(~"h@{index}") {
font-size: ((@em * @multiplierLarge) - ((@index * ((@em * @multiplierLarge) / 6 )))) + (@em * @multiplier);
}
.headingsX(@index - 1);
}
@srsgores
srsgores / gist:5305036
Created April 3, 2013 20:38
New Module Pseudo-selector Styles
.label, .badge {
font-size: 0.9em;
font-weight: bold;
line-height: 1.4;
color: #fff;
vertical-align: baseline;
white-space: nowrap;
text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
background-color: #999;
}
@srsgores
srsgores / search-input.html
Created October 22, 2013 00:05
Html5 search input with voice control, results dropdown, and autosave.
<input type = "search" placeholder = "Search..." required x-webkit-speech name="filter_search" results = "10" autosave = "unique-auto-save-name"/>
@srsgores
srsgores / dabblet.css
Created April 29, 2013 02:49 — forked from anonymous/dabblet.css
CSS3 Windows 8 Window
/**
* CSS3 Windows 8 Window
*/
.window {
padding: 0.2em;
border: 1px solid blue;
}
.window .app-icon, .window .program-status {
display: inline-block;
@srsgores
srsgores / all_pokemon.sql
Last active November 11, 2017 01:59
Query pokemon data
SELECT p.species_id, p.height, p.weight, p.base_experience, p.is_default, ps.*, pev.* FROM pokemon p
INNER JOIN pokemon_species ps on ps.id=p.id
INNER JOIN pokemon_evolution pev on pev.id=p.id
INNER JOIN pokemon_stats pstat on pstat.pokemon_id=p.id