Skip to content

Instantly share code, notes, and snippets.

View imlucas's full-sized avatar
⚒️

Lucas Hrabovsky imlucas

⚒️
  • CNN
  • Philadelphia, PA
View GitHub Profile
var noun_type_flexclass = {
_name: "class name",
suggest: function( text, html ) {
var suggestions = [CmdUtils.makeSugg(text)];
return suggestions;
}
}
var FIRST_CLASS_NAME;
CmdUtils.CreateCommand({
var noun_type_flexclassname = {
_name: "class name",
suggest: function( text, html ) {
var suggestions = [CmdUtils.makeSugg(text)];
return suggestions;
}
}
var __FLEXDOC_FIRST_CLASS_NAME;
CmdUtils.CreateCommand({
<?php
private static function sortAlbumsByBestSelling($genreIds, $excludeIds = array(),
$perPage, $pageNum, $priceFilter=null){
$sources = array(new Amie_ListGen_Source_DbAlbumSales(),
new Amie_ListGen_Source_DbAlbumSales());
foreach ($sources as $source) {
self::addGenreFilter($genreIds, $source);
self::addPriceFilter($priceFilter, $source);
$source->filterExcludeAlbums($excludeIds);
}
<html>
<head>
<title>Recommendations for you - Amie Street</title>
<style type="text/css">
*{ padding:0px; margin:0px; }
body{ background:#D5DEE7; }
a{ color:#C8DCE5; }
h3{ margin: 10px 10px 0 10px; color:#FFF; font:16pt Arial, sans-serif; letter-spacing:-1px; font-weight: bold; }
// Override the default now oplaying to allow an event to buybble up when we chaaange the track
// This way we can listen for it easily without polling to check for Amie Street Links
function displayTrack(track, show) {
var trackId = track.trackId;
var title = track.title;
var artist = track.contributor;
var activeClass = (track.is_fav) ? "active" : "";
var show = (show ? '' : 'style="display:none"')
html = '<li ' + show + ' class="now_playing favable">';
$.hotness = function(options){
var wpFeedUrl = options.url;
var currentPage = 1;
var isLoading = false;
var debug = options.debug || false;
var loader;
function init(){
if($('#content-container-loader').length <1){
$(options.loader).insertAfter('.post:last');
#!/usr/bin/php
<?php
require_once dirname(__FILE__) . '/phpresolver/playdarresolver.php';
/**
* A resolver for MP3s from Amie Street
* @author Lucas Hrabovsky (lucas@amiestreet.com)
*/
class AmieStreetResolver extends PlaydarResolver
#!/usr/bin/php
<?php
require_once dirname(__FILE__) . '/phpresolver/playdarresolver.php';
/**
* A resolver for MP3s from Amie Street
* @author Lucas Hrabovsky (lucas@amiestreet.com)
*/
class AmieStreetResolver extends PlaydarResolver
# Add this to .profile or .bash_profile
#
# Or the cool way:
# cd ~/ && git clone git://gist.github.com/114160.git .githelper && echo "# Add me to your .profile or .bash_profile. Save the file, open a new terminal, and you'll have all of this." && echo "" && echo "source ~/.githelper/gistfile1.sh"
#
# - When inside a git working directory, modifies prompt to be (git)$wd[$branch]/
# - Adds a number of short hand aliases, ie pull instead of git pull, k instead of gitk
# - Adds one command calls for making new branches, deleting branches
# - Adds one command call for freebasing (fetch and rebase)
# - And a few other nuggets
// ==UserScript==
// @name Playdar_AmieStreet
// @namespace http://www.playdar.org/
// @description Add Playdar links to Amie Street
// @include http://amiestreet.com/*
// ==/UserScript==
function load_script (url) {
// Load the playdar.js
var s = document.createElement('script');