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
@eviltrout
eviltrout / cla.md
Last active Feb 12, 2020 — forked from xfalcox/cla.md
Discourse Contributor License Agreement
View cla.md

Discourse Contributor License Agreement

The document below clarifies the terms under which You (the copyright owner or legal entity authorized by the copyright owner), may make "The Contributions" (software, bug fixes, configuration changes, documentation, or any other materials) to "The Work" (Discourse/Discourse). This license protects You, "The Company" (Civilized Discourse Construction Kit, Inc.) and licensees; it does not change your rights to use your own contributions for any other purpose.

You and "The Company" (Civilized Discourse Construction Kit, Inc.) agree:

• You grant to "The Company" (Civilized Discourse Construction Kit, Inc.) a non-exclusive, irrevocable, worldwide, royalty-free, sublicenseable, relicenseable, transferable license under all of Your relevant intellectual property rights, to use, copy, prepare derivative works of, distribute and publicly perform and display "The Contributions" on any licensing terms, including without limitation: (a) open source licenses like the GNU Gener

View perf.rb
# frozen_string_literal: true
require 'benchmark/ips'
class Key
def a?
true
end
def b?
View gist:76cef15031e7152e5d507bfcc969d312
### 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 0AAD 3ED7 A2F2 84ED 1D51 4F4F 0C8B D124 983D D654
To claim this, I am signing this object:
View synchronizer_spec.rb
describe Synchronizer do
class TestSynchorizer < Synchronizer
def initialize(can_sync)
@can_sync = can_sync
@performed = false
end
def can_sync?
@can_sync
View pre-commit
#!/bin/sh
# This pre-commit hook will prompt for every file that contains a `console.log`, `debugger`
# or `puts` statement. This should avoid stupidly commiting debugging information :)
exec < /dev/tty
confirm() {
echo "${1:-Are you sure? [y/N]}"
read -r response
View gist:9d8fd6d301dcf333f8f5
git grep "plugin-outlet"
app/assets/javascripts/admin/templates/admin.hbs: {{plugin-outlet "admin-menu" tagName="li"}}
app/assets/javascripts/discourse/helpers/plugin-outlet.js.es6: {{plugin-outlet "evil-trout"}}
app/assets/javascripts/discourse/helpers/plugin-outlet.js.es6: {{#plugin-outlet "hello-world"}}
app/assets/javascripts/discourse/helpers/plugin-outlet.js.es6: {{/plugin-outlet}}
app/assets/javascripts/discourse/helpers/plugin-outlet.js.es6:Ember.HTMLBars._registerHelper('plugin-outlet', function(params, hash, options, env) {
app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs:{{plugin-outlet "category-custom-settings"}}
app/assets/javascripts/discourse/templates/components/topic-category.hbs:{{plugin-outlet "topic-category"}}
app/assets/javascripts/discourse/templates/composer.hbs: {{plugin-outlet "composer-open"}}
app/assets/javascripts/discourse/templates/composer.hbs: {{plugin-outlet "composer-fields"}}
View gist:da4a95df66319ec1b1dd
orker: `pngquant` not found; please provide proper binary or disable this worker (--no-pngquant argument or `:pngquant => false` through options)
jhead worker: `jhead` not found; please provide proper binary or disable this worker (--no-jhead argument or `:jhead => false` through options)
jpegoptim worker: `jpegoptim` not found; please provide proper binary or disable this worker (--no-jpegoptim argument or `:jpegoptim => false` through options)
svgo worker: `svgo` not found; please provide proper binary or disable this worker (--no-svgo argument or `:svgo => false` through options)
.pngquant worker: `pngquant` not found; please provide proper binary or disable this worker (--no-pngquant argument or `:pngquant => false` through options)
jhead worker: `jhead` not found; please provide proper binary or disable this worker (--no-jhead argument or `:jhead => false` through options)
jpegoptim worker: `jpegoptim` not found; please provide proper binary or disable this worker (--no-jpegoptim argument or `:jpegoptim
View gist:5309a16c554dd008aae4
require("./reset.scss");
require("./crotchzombie.scss");
$(window).ready(function() {
const $logo = $('#logo');
let played = false;
function playAudio() {
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();
View gist:575b2c4c389aa49e7380
function handleResult(result)
{
console.log(result);
statement1;
statement2;
}
getDataFromServer().then(handleResult);
You can’t perform that action at this time.