Skip to content

Instantly share code, notes, and snippets.

Sean Goresht srsgores

Block or report user

Report or block srsgores

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@srsgores
srsgores / map-toolbar.coffee
Created Feb 22, 2014
map toolbar coffeescript sample
View map-toolbar.coffee
class MapToolbar
constructor: (@toggled, @mapToolbar, @toolbarToggle, @mapToolbarIcon, @mapToolbarContent, @searchButton) ->
# Variables
@mapToolbar = $(".mapToolbar")
@toolbarToggle = @mapToolbar.find(".show-toolbar")
@mapToolbarIcon = @toolbarToggle.find("i")
@mapToolbarContent = @mapToolbar.find(".toolbar-content")
@searchButton = @mapToolbar.find(".show-search")
search: ->
@searchButton.on "click", ->
@srsgores
srsgores / FormValidator.coffee
Created May 11, 2014
Validator custom class for validating a jQuery form
View FormValidator.coffee
class Validator
constructor: (@$form, @$isTabbed) ->
checkStrength: (password) ->
characters = 0
capitalletters = 0
loweletters = 0
number = 0
special = 0
total = 0
@srsgores
srsgores / Custom_codecept.xml
Created May 17, 2014
PHPStorm command-line auto-completion configuration for codeception
View Custom_codecept.xml
<?xml version="1.0" encoding="UTF-8"?>
<framework xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" NamespaceSchemaLocation = "schemas/frameworkDescriptionVersion1.1.3.xsd" name = "Custom_codecept" invoke = "$ProjectFileDir$\vendor\bin\codecept.bat" alias = "cc" enabled = "true" version = "2">
<command>
<name>help</name>
<help>
<![CDATA[The <info>help</info> command displays help for a given command:<br/> <br/> <info>php bin\codecept help list</info><br/> <br/> You can also output the help in other formats by using the <comment>--format</comment> option:<br/> <br/> <info>php bin\codecept help --format=xml list</info><br/> <br/> To display the list of available commands, please use the <info>list</info> command.]]></help>
<params>command_name[=null]</params>
<optionsBefore>
<option name = "--help" shortcut = "-h">
<help><![CDATA[Display this help message.]]></help>
@srsgores
srsgores / functions.php
Created Jun 14, 2014
Custom TinyMCE Wordpress Configuration
View functions.php
<?php
/**
* @package Mantaray Theme
* @author Sean Goresht http://seangoresht.com
* @copyright Copyright (2014) Sean Goresht
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL
*/
// load config
require_once(dirname(__FILE__) . "/config.php");
@srsgores
srsgores / helpers.styl
Created Aug 19, 2014
Generate Placeholders in Stylus
View helpers.styl
displays = block inline-block inline table
derps = me myMom myDad smurffy
generatePlaceholder(display, displays)
generatePlaceholder(derp, derps)
body
@extend $block
@extend $smurffy
@srsgores
srsgores / helpers.styl
Created Aug 19, 2014
Stylus Dynamic Placeholders
View helpers.styl
properties = margin padding
proportions = mini small normal medium large
directions = top left bottom right
$smallmargintop = 1.3em
for property in properties
for proportion, i in proportions
@srsgores
srsgores / helpers.styl
Created Aug 29, 2014
Trying to dynamically generate placeholders
View helpers.styl
use("camelize.js")
directions = top left bottom right
properties = margin padding
proportions = mini small normal medium large
positions = fixed absolute static relative
@srsgores
srsgores / form-actions.hbs
Created Nov 13, 2014
form actions component
View form-actions.hbs
<footer {{bind-attr class="classNames"}}>
<button {{action "didSaveObject"}}>Save {{text}} <i {{bind-attr class="iconClassName"}}></i></button>
{{yield}}
</footer>
View form-actions.coffee
`import Ember from "ember"`
FormActionsComponent = Ember.Component.extend(
save: null
classNames: "form-actions",
model: null
redirectRoute: "admin"
icon: "save"
iconClassName: (->
"icon-#{@get("icon")}"
@srsgores
srsgores / dashboard.coffee
Created Nov 19, 2014
Authenticated route for a dashboard in EmberJS
View dashboard.coffee
`import Ember from "ember"`
DashboardRoute = Ember.Route.extend(
beforeModel: (transition) ->
loginController = @controllerFor("login")
unless loginController.get("isLoggedIn")
loginController.setProperties({
loginFailed: true
attemptedTransition: transition
})
You can’t perform that action at this time.