Navigation Menu

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
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
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
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"}}
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()
}
}
@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()
}
IFS=$(echo -en "\n\b")
for i in $(find . -name "*'s conflicted copy *"); do echo rm "$i"; done

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.

app = angular.module('fs.collections')
app.factory 'BaseCollection', ($http, BaseModel) ->
class BaseCollection
model: BaseModel
currentlyFetching: false
constructor: (models, @opts) ->
@[key] = value for key, value of @opts
@models = []
postgres://user:pass@host:port/db
encoding
pool
app.directive 'favorites', (overlay) ->
template: """
<button ng-click="show()">Show favorites</button>
"""
link: (scope) ->
scope.show = ->
overlay.open
templateUrl: 'favorites-list.html'
$scope: scope