Skip to content

Instantly share code, notes, and snippets.

View typeoneerror's full-sized avatar
🤠
iOS, Capacitor, Ember, Vue, Rails

Benjamin Borowski typeoneerror

🤠
iOS, Capacitor, Ember, Vue, Rails
View GitHub Profile
@typeoneerror
typeoneerror / main.js
Last active January 22, 2021 16:13 — forked from weotch/main.js
// This our standard require js bootstrap file. It assumes you are using the
// require-jquery.js file that require.js provides
// Set the require.js configuration for the application
require.config({
// Base path used to load scripts
baseUrl: 'js/',
// Prevent caching during dev
urlArgs: "bust=" + (new Date()).getTime(),
#home-feature .image img {
position: relative;
top: 0;
left: 0;
transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-webkit-transition: all 0.2s ease-in-out;
}
#home-feature .image:hover img {
top: -5%;

Keybase proof

I hereby claim:

  • I am typeoneerror on github.
  • I am typeoneerror (https://keybase.io/typeoneerror) on keybase.
  • I have a public key whose fingerprint is BFC5 50E7 C93F 53F9 F9F4 C1F9 0011 F06C CD8A 1AFE

To claim this, I am signing this object:

@typeoneerror
typeoneerror / video_id_from_youtube_url.php
Created May 6, 2014 17:18
Simple function for matching any youtube link and grabbing the ID
if (!function_exists('video_id_from_youtube_url')):
function video_id_from_youtube_url($source)
{
$pattern = '/^(?:(?:(?:https?:)?\/\/)?(?:www.)?(?:youtu(?:be.com|.be))\/(?:watch\?v\=|v\/)?([\w\-]+))/is';
$matches = array();
preg_match($pattern, $source, $matches);
if (isset($matches[1])) return $matches[1];
return false;
}
// TODO: watch for renaming of files or adding/deleting files
// Requirements
var gulp = require('gulp')
, changed = require('gulp-changed')
, clean = require('gulp-clean')
, coffee = require('gulp-coffee')
, compass = require('gulp-compass')
, concat = require('gulp-concat')
, minifyCSS = require('gulp-minify-css')
@typeoneerror
typeoneerror / 1. bad.js
Last active August 29, 2015 14:07
ember.js property oopsie
queryParams: ['draft'],
draft: null,
courses: function() {
isDraft = this.get('draft');
return this.get('model').filterBy('isDraft', isDraft).sortBy('name');
}.property('draft'); // courses are filtered when draft query param changes
@typeoneerror
typeoneerror / indexes.emblem
Created October 30, 2014 00:57
volatile properties with ember.js
App.AdminAccountIndexController = Ember.Controller.extend
_tabIndex: 0
tabIndex: (->
@incrementProperty('_tabIndex')
@get('_tabIndex')
).property('_tabIndex').volatile()
@typeoneerror
typeoneerror / sortable.rb
Created November 15, 2014 22:30
Concern for PostgreSQL sort records by ID in one query
module DokiCore
module Concerns
module Sortable
extend ActiveSupport::Concern
module ClassMethods
# Run a "single" query to update multiple records by position.
#
# The Array of passed in IDs are sorted in the order they are
@typeoneerror
typeoneerror / run-backend.sh
Last active August 29, 2015 14:09
run all the things
#!/bin/bash
# backend/run
echo -n -e "\033]0;Rails\007"
foreman start
echo -n -e "\033]0;\007"