Skip to content

Instantly share code, notes, and snippets.

srsgores / _power-select.pcss
Created February 17, 2019 06:09
Ember power select for postcss
View _power-select.pcss
:root {
/* Backgrounds --ember-power-select-background-color: #ffffff; */
--ember-power-select-disabled-background-color: #eeeeee;
--ember-power-select-multiple-selection-background-color: #e4e4e4;
--ember-power-select-highlighted-background: #5897fb;
--ember-power-select-selected-background: #dddddd;
--ember-power-select-text-color: inherit;
/* Texts --ember-power-select-text-color: inherit; */
--ember-power-select-placeholder-color: #999999;
srsgores / remove-facebook-ads.js
Created April 19, 2018 04:10
Remove facebook sponsored ads
View remove-facebook-ads.js
"use strict";
MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
const observer = new MutationObserver(function(mutations, observer) {
const sponsoredRegex = /[S][sponred]*/;
mutations.filter((mutation) => => match === "").length >= 4).map((ad) =>;
srsgores / all_pokemon.sql
Last active November 11, 2017 01:59
Query pokemon data
View all_pokemon.sql
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
INNER JOIN pokemon_evolution pev on
INNER JOIN pokemon_stats pstat on
srsgores /
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 /
Last active August 29, 2015 14:10
A sad reality.
Failure of mankind
@author Sean
@note Created on 2014-11-22 by Sean Goresht
@note uses Codoc
srsgores /
Created November 19, 2014 00:25
Authenticated route for a dashboard in EmberJS
`import Ember from "ember"`
DashboardRoute = Ember.Route.extend(
beforeModel: (transition) ->
loginController = @controllerFor("login")
unless loginController.get("isLoggedIn")
loginFailed: true
attemptedTransition: transition
srsgores /
Created November 13, 2014 07:49
Action bubbling
`import Ember from "ember"`
FormActionsComponent = Ember.Component.extend(
save: null
classNames: "form-actions",
model: null
redirectRoute: "admin"
icon: "save"
iconClassName: (->
srsgores / form-actions.hbs
Created November 13, 2014 07:24
form actions component
View form-actions.hbs
<footer {{bind-attr class="classNames"}}>
<button {{action "didSaveObject"}}>Save {{text}} <i {{bind-attr class="iconClassName"}}></i></button>
srsgores / flexbox-helpers.styl
Created November 7, 2014 07:21
Helpers for flexbox
View flexbox-helpers.styl
-webkit-box-flex arguments[0]
-webkit-flex arguments
-moz-box-flex arguments[0]
-ms-flex arguments
flex arguments
display -webkit-box
display -webkit-flex
srsgores / helpers.styl
Created August 29, 2014 01:58
Trying to dynamically generate placeholders
View helpers.styl
directions = top left bottom right
properties = margin padding
proportions = mini small normal medium large
positions = fixed absolute static relative