This file contains hidden or 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
// a is a Nodelist | |
// like document.getElementsByClassName('class') | |
[].forEach.call(a, function (e) { console.log(e.children[0].innerHTML) }); |
This file contains hidden or 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
@mixin vendor-prefix($name, $argument) { | |
#{$name}: #{ $argument }; | |
-webkit-#{$name}: #{ $argument }; | |
-ms-#{$name}: #{ $argument }; | |
-moz-#{$name}: #{ $argument }; | |
-o-#{$name}: #{ $argument }; | |
} |
This file contains hidden or 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
* { background-color: rgba(255,0,0,.2); } | |
* * { background-color: rgba(0,255,0,.2); } | |
* * * { background-color: rgba(0,0,255,.2); } | |
* * * * { background-color: rgba(255,0,255,.2); } | |
* * * * * { background-color: rgba(0,255,255,.2); } | |
* * * * * * { background-color: rgba(255,255,0,.2); } |
This file contains hidden or 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
<?php | |
$bn = basename($_SERVER['SCRIPT_NAME'], '.php'); | |
$p = explode('_', $bn); | |
$model_name = substr($p[0], 0, -1); | |
$model_path = "../models/$model_name.php"; | |
include_once($model_path); | |
include_once('../../config/routes.php'); | |
$controller_name = $p[0]; | |
function loadRESTfulView($controllerName, $action, $_options) { |
This file contains hidden or 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
require 'rspec/core/version' | |
class Spork::TestFramework::RSpec < Spork::TestFramework | |
DEFAULT_PORT = 8989 | |
HELPER_FILE = File.join(Dir.pwd, "spec/spec_helper.rb") | |
def run_tests(argv, stderr, stdout) | |
if rspec1? | |
::Spec::Runner::CommandLine.run( | |
::Spec::Runner::OptionParser.parse(argv, stderr, stdout) |
This file contains hidden or 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
var uploadImage = function(form, responseHandler, setup, teardown) { | |
var eventHandler, iframe, _this; | |
iframe = document.createElement('iframe'); | |
iframe.setAttribute('name', 'uploadTarget'); | |
iframe.setAttribute('style', 'display: none'); | |
document.body.appendChild(iframe); | |
_this = this; | |
eventHandler = function() { | |
var content; | |
if (iframe.detachEvent) { |
This file contains hidden or 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
window.onerror = function(msg, url, line) { | |
message = 'Javascript error: *' + msg + '* (' + url + ':' + line + ') for session: *' + getCookie('session_code') + '*' | |
$.post('/alerts', { | |
message: message | |
}, | |
function() { console.log('Successfully reported error') } | |
) | |
} |
This file contains hidden or 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
class AlertsController < ApplicationController | |
include SlackHelper | |
def create | |
message = params[:message] || '' | |
slack_post_alert message | |
render nothing: true and return | |
end | |
end | |
module SlackHelper |
This file contains hidden or 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
Tunetap helps musicians play more shows by crowdfunding ticket sales to measure fan demand and cover the costs of putting on the show. It's pretty difficult for aspiring artists to achieve any sort of success, and although the industry has shifted towards live events, organizing them is a difficult process, and potential losses from poor turnouts provide a high barrier to entry. Tunetap is a site for growing artists to set up potential events and tours, and incentive their fans to preorder tickets to reach a break-even point. On top of that, we're layering insights into the way fans are behaving across the industry so we can offer every artist specific suggestions for marketing approaches and potential show locations – information that's currently only available to the biggest players in the industry. | |
To me, Tunetap is a practical embodiment of a life-long personal belief: well-designed technology can ease and eliminate friction in the things we do, freeing us to do great things. I'm excited to be working w |
OlderNewer