Skip to content

Instantly share code, notes, and snippets.

View 8bitDesigner's full-sized avatar

Paul Sweeney 8bitDesigner

  • Cisco Meraki
  • Los Angeles
View GitHub Profile

Hi, we're Fullscreen in Los Angeles

...and we're in need of a Lead Front-End Engineer! Obviously, you've got plenty of great options right now, so why should you pick us?

We build tools for the next generation of video creators, and are an enthusiastic, passionate group who value learning and mentorship.

Responsibilities:

You'll be working as part of a small, autonomous team to build quality apps to support our creators. That means working directly with the product owner to shape and architect new projects and features, and with our mobile and back-end engineers to integrate your work.

Sound good? Great.

IFS=$(echo -en "\n\b")
for i in $(find . -name "*'s conflicted copy *"); do echo rm "$i"; done
@8bitDesigner
8bitDesigner / home.js
Last active August 29, 2015 14:08
Toggle between Home and Work Chrome Profiles
var Chrome = Application('Google Chrome')
, SysEvents = Application('System Events')
, ChromeUI = SysEvents.applicationProcesses.byName('Google Chrome')
, peopleMenu = ChromeUI.menuBars[0].menuBarItems.byName('People').menus.byName('People')
, workWindow, homeWindow
function getProfileName(win) {
return win.uiElements()[5].name()
}
var Chrome = Application('Google Chrome')
, ChromeUI = Application('System Events').applicationProcesses.byName('Google Chrome')
, peopleMenu = ChromeUI.menuBars[0].menuBarItems.byName('People').menus.byName('People')
function closeAll(obj) {
for (var i = 0; i < obj.length; i++) {
obj[i].close()
}
}
fullscreenAdminId = "x1gcqfp"
paulsPersonalAuthToken = User.find(23679).authentications.last.token
RestClient.post(
"https://api.dailymotion.com/me/parents/#{fullscreenAdminId}", {}, # post body
{accept: :json, Authorization: "Oauth #{paulsPersonalAuthToken}"} # headers
)
# {"error":{"code":403,"message":"Unsufficient scope for `POST \/user\/<id>\/parents\/<user>', scope required: ","type":"access_forbidden"}}
app = angular.module('fs.platform')
# Utility for opening/closing modals cleanly
app.factory 'fsModal', ($modal, $rootScope) ->
return (opts) ->
modal = $modal.open(opts)
# Listen for navigation events, and close the modal if it's still open
unwatch = $rootScope.$on '$routeChangeSuccess', ->
if modal
class YoutubePublishController
unwatchers: []
constructor: (@$scope, @$modal, @$filter, YTVaultVideo) ->
# Call un-registration functions on destroy
@$scope.$on '$destroy', => @unwatchers.forEach (fn) -> fn()
# Open a model showing advanced settings
openAdvancedModal: ->
# Dispose of models cleanly
@8bitDesigner
8bitDesigner / delta.js
Created July 24, 2014 23:28
Get the difference in styles between two HTML nodes
function styleDelta(a, b) {
var aStyles = window.getComputedStyle(a)
, bStyles = window.getComputedStyle(b)
, delta = {}
Object.keys(aStyles).forEach(function(key) {
var aVal = aStyles[key]
, bVal = bStyles[key]
if (aVal != bVal) {

Usage

node index.js <source server> <destination server> [optional cookie string]

cors-proxy accepts HTTP requests and proxies them to the destination server as though they originated from the source server. This allows you to, for example, develop locally and make CORS requests against a production or staging server.

app.directive 'dingus', ->
controller: ($scope, $filter) ->
$scope.someText = ->
$filter('translate')('translation-key', some: values})