Skip to content

Instantly share code, notes, and snippets.

Robin Ward eviltrout

Block or report user

Report or block eviltrout

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:10170564
describe Onebox::Engine::WikipediaOnebox do
before(:all) do
@link = "http://en.wikipedia.org/wiki/Billy_Jack"
end
include_context "engines"
it_behaves_like "an engine"
describe "#to_html" do
View keybase.md

Keybase proof

I hereby claim:

  • I am eviltrout on github.
  • I am eviltrout (https://keybase.io/eviltrout) on keybase.
  • I have a public key whose fingerprint is 0519 4970 7036 48F4 15D9 A027 E36C C570 ECC5 EE24

To claim this, I am signing this object:

View gist:812fde534280e38312af
" =====================================================================
" Initialize: {{{1
set nocp
filetype plugin indent on
set runtimepath^=~/.vim/bundle/ctrlp.vim
syntax on
set wildignore+=*/tmp/*,*/log/*,*/pg_dumps/*,*.so,*.swp,*.zip,*.png,*.jpg,*/public/*,*/chef/*,*/vendor/*,*/node_modules/*,*/fixtures/* " MacOSX/Linux
View gist:376ebc2404cc19bfea0a
var refresher = function() {
if(Discourse.SiteSettings.login_required) {
   window.location.pathname = Discourse.getURL('/');
 } else {
   window.location.reload();
 }
};
bootbox.dialog(I18n.lookup("log_out_redirect"), { label: 'Refresh', callback: refresher}, {onEscape: refresher, backdrop: 'static'})
View gist:803abe027113d7fb0064
var refresher = function() {
if(Discourse.SiteSettings.login_required) {
window.location.pathname = Discourse.getURL('/');
} else {
  window.location.reload();
}
};
bootbox.dialog(I18n.lookup("log_out_redirect"), { label: 'Refresh', callback: refresher}, {onEscape: refresher, backdrop: 'static'})
View gist:ae03d8fbbec328b45300
import StringBuffer from 'discourse/mixins/string-buffer';
export default Ember.Component.extend(StringBuffer, {
classNameBindings: ['containerClass'],
rerenderTriggers: ['condition'],
containerClass: function() {
return (this.get('size') === 'small') ? 'inline-spinner' : undefined;
}.property('size'),
View gist:16953aea71434877c076
export default Ember.Component.extend({
classNameBindings: ['containerClass'],
containerClass: function() {
return (this.get('size') === 'small') ? 'inline-spinner' : undefined;
}.property('size'),
render: function(buffer) {
if (this.get('condition')) {
buffer.push('<div class="spinner ' + this.get('size') + '"}}></div>');
View gist:575b2c4c389aa49e7380
function handleResult(result)
{
console.log(result);
statement1;
statement2;
}
getDataFromServer().then(handleResult);
View gist:ab86250076eee21d2325
- var tags = this.get('value').split(',').map(function(v) {
- return v.trim();
- }).reject(function(v) {
- return v.length === 0;
- }).uniq();
-
+ const tags = this.get('value').split(',').map(v => v.trim()).reject(v => v.length === 0).uniq();
You can’t perform that action at this time.