Skip to content

Instantly share code, notes, and snippets.

@broox9
broox9 / proverbs27_17.js
Created July 23, 2019 03:31
a quote as a code block. Basically a joke.
/* I fully expect a PR comment saying this could be one line */
const PROVERBS_27_17 = `
As iron sharpens iron,
so a friend sharpens a friend.`
@broox9
broox9 / portcheck.sh
Created September 19, 2018 21:04
Port Check Script
#!/bin/bash
# pass a port to the script or default to 8080
x=8080
if [ $1 ];
then
x=$1
fi
lsof -nP -iTCP:$x | grep LISTEN
onFinalized: function (e) {
this.showStatusInModal('finalized');
this.quickpostModel.set('id', null);
//why not add an event?
SRM.Dashboard.views.QuickPostPanelView.vent.trigger('quickpost:post:finalized') //#boom
}
/* or if you want to be fancy */
/* code calling QP */
QuickPostPanelView({
@broox9
broox9 / Gemfile.lock
Created October 16, 2014 16:39
Andy Gemfile.lock because magick sux
GIT
remote: git@github.com:vitrue/i18n-js
revision: eeec14066b50f72876aa789c9b1f226172452798
tag: 2.1.2.1
specs:
i18n-js (2.1.2)
i18n
GIT
remote: https://075f5f799dc6cfd1d44e4b5c8db6094ded0cd9e7:x-oauth-basic@github.com/vitrue/accountable.git
def duplicate
h = {}
h['new_promotion_name'] = params[:new_promotion_name]
h['duplicate_posts'] = params[:duplicate_posts]
h['promotion_id'] = @promotion._id
DuplicatePromotion.perform_async(h)
#Rails.logger.debug "******************** DUPLICATE JOB !!!! #{job_id}*************************"
@broox9
broox9 / transloadit error
Created June 5, 2014 19:57
when trying to upload that random image
{"error":"HTTP_IMPORT_VALIDATION","message":"No url parameter provided","uploader":"jacqui.transloadit.com","assembly_id":"5b028b90eceb11e39188fb759403c72a","parent_id":null,"assembly_url":"http://api2.jacqui.transloadit.com/assemblies/5b028b90eceb11e39188fb759403c72a","assembly_ssl_url":"https://jacqui.transloadit.com/assemblies/5b028b90eceb11e39188fb759403c72a","bytes_received":442,"bytes_expected":442,"client_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36","client_ip":"68.197.248.154","client_referer":"http://publisher.staging.ey.vitrue.com/posts/new","start_date":"2014/06/05 19:55:33 GMT","is_infinite":false,"has_dupe_jobs":false,"upload_duration":0.033,"execution_start":"2014/06/05 19:55:33 GMT","execution_duration":0,"notify_start":null,"notify_url":null,"notify_status":null,"last_job_completed":null,"notify_duration":null,"fields":{},"running_jobs":[],"bytes_usage":0,"executing_jobs":[],"started_jobs":[],"files_to_store_o
"body {
background: #ffffff; /* Old browsers */
background: -moz-radial-gradient(center, ellipse cover, #ffffff 21%, #d5d5d5 93%, #888888 100%); /* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(21%,#ffffff), color-stop(93%,#d5d5d5), color-stop(100%,#888888)); /* Chrome,Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover, #ffffff 21%,#d5d5d5 93%,#888888 100%); /* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover, #ffffff 21%,#d5d5d5 93%,#888888 100%); /* Opera 12+ */
background: -ms-radial-gradient(center, ellipse cover, #ffffff 21%,#d5d5d5 93%,#888888 100%); /* IE10+ */
background: radial-gradient(ellipse at center, #ffffff 21%,#d5d5d5 93%,#888888 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#888888',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
@broox9
broox9 / maintemplate.html
Last active December 17, 2015 16:29
two templates instantiated and put together
<div id="mainTemplate">
<div id="contentOne">Content One</div>
<div id="contentTwo"> {{ somevar }} </div>
<div id="contentThree"></div>
</div>
@broox9
broox9 / gist:5162487
Last active December 14, 2015 22:59
/publisher/public/javascripts/apps/create_post/views/settingsFacebook.js -- IE Method Not found and the fix I used
/*
* Not working in IE for some reason
* it's really just using and Underscore method through Backbone
*/
var fbStreams = this.options.streams.models.filter(function(s){
return (s.get('selected') == true && s.get('type') == "facebook");
});
/*
* THIS works in IE