Skip to content

Instantly share code, notes, and snippets.

View citylims's full-sized avatar
🎯
Focusing

Austin Formica citylims

🎯
Focusing
View GitHub Profile
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
div{
.box-shadow(inset 0 0 0 1px black) !important;
}
var request = function(method, path, params, callback) {
params.client_id = sc.soundcloud.client_id;
params.oauth_token = sc.soundcloud.access_token;
$http({
method: method,
url: sc.soundcloud.api.host + path,
params: params
})
.success(callback);
app.filter('selectedCategories', function(){
return function(items, cats){
if(!cats){
return items;
}
var choices = cats.reduce(function(p,cat){
if (cat.checked){
p.push(cat.catName);
}
'use strict';
//auth routes with ui.router, and middleware auth headers for http client;
var app = angular
.module('clientApp', [
'ui.router',
'angular-storage',
]);
require 'sinatra'
require 'sinatra/reloader'
require 'omniauth-twitter'
configure do
enable :sessions
user OmniAuth::Builder do
provider :twitter, ENV['CONSUMER_KEY'], ENV['CONSUMER_SECRET']
end
end
@citylims
citylims / chrome_tabs.js
Created November 24, 2015 02:42
Semantics with google chrome api
//execute my jquery script in chrome tabs;
//execute my content script in the chorme tabs;
chrome.tabs.executeScript({ file: "jquery.min.js" }, function() {
chrome.tabs.executeScript({ file: "scripts/content.js" });
});
//when a new chrome tab is created run my function;
chrome.tabs.onCreated.addListener(function(tabId, changeInfo, tab) {
refeshScript();
});
@citylims
citylims / ghostwriter.js
Last active January 20, 2016 18:18
ghostwriter angular directive
(function() {
'use strict';
/**
* @desc directive for ghostwriter
* @example <ghost-writer></ghost-writer>
*/
angular
.module('starter')
@citylims
citylims / mutation_observer.js
Created October 20, 2015 18:24
DOM Mutation Observer.
MutationObserver = window.WebKitMutationObserver;
var observer = new MutationObserver(function(mutations, observer) {
console.log(mutations, observer);
foo()
});
observer.observe(document, {
subtree: true,
childList: true,
@citylims
citylims / Ionic Emulate Hack
Created April 10, 2015 20:08
Ionic ios emulate workaround script
#!/bin/bash
# Manually emulate ionic/cordova application
echo "Emulating..."
cd ./platforms/ios/build/emulator
var=$(pwd)
ios-sim launch "$var"/*.app