Skip to content

Instantly share code, notes, and snippets.

View aergonaut's full-sized avatar

Chris Fung aergonaut

View GitHub Profile
require 'bundler/inline'
gemfile(true) do
source "http://rubygems.org"
gem "activerecord", "~> 4.2"
gem "sqlite3"
end
require "active_record"
class Circle
def initialize(radius:)
@radius = radius
end
def area
Math::PI * (@radius ** 2)
end
end
class OnlineMigration
class << self
def online(&block)
# OnlineVerifier runs the syntax inside the block. It only has methods
# defined that we agree are safe for online migrations. If you use an
# unsafe method inside the online {} block, the class won't load.
verifier = OnlineVerifier.new
verifier.instance_eval(&block)
define_method(:change, &block)
end

Keybase proof

I hereby claim:

  • I am aergonaut on github.
  • I am aergonaut (https://keybase.io/aergonaut) on keybase.
  • I have a public key whose fingerprint is 64B2 6FC0 4B61 2E58 F378 B053 CFF9 D795 1895 2237

To claim this, I am signing this object:

var path = require('path'),
assets_path = path.join('app', 'assets', 'javascripts');
var config = {
context: path.resolve(assets_path),
entry: './entry.js',
output: {
filename: 'bundle.js',
path: path.resolve(assets_path)
},
// @name Propagate
// @namespace JIRA
// @include https://coupadev.atlassian.net/browse/CD-17006
// @version 1
// @grant none
// ==/UserScript==
//alert('start');
window.Jira = {};
@aergonaut
aergonaut / application.js
Last active August 29, 2015 14:09
Boilerplate code for a simple Rails application using a combination of webpack and gulp for building frontend javascript assets.
// Standard app/assets/javascripts/application.js manifest
// Includes bundle.js file generated by Webpack
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
@aergonaut
aergonaut / permissions.yml.diff
Created September 17, 2014 01:01
Permissions diff from v11.0.5 to v11.0.6
diff --git a/db/blank/permissions.yml b/db/blank/permissions.yml
index d72af51..0024023 100644
--- a/db/blank/permissions.yml
+++ b/db/blank/permissions.yml
@@ -1487,6 +1487,18 @@ approval_limits__update_approval_limit_account_segments:
action: update_approval_limit_account_segments
description:
flavor: 0
+online_help__index:
+ id: 91013
diff --git a/db/blank/permissions.yml b/db/blank/permissions.yml
index d72af51..0024023 100644
--- a/db/blank/permissions.yml
+++ b/db/blank/permissions.yml
@@ -1487,6 +1487,18 @@ approval_limits__update_approval_limit_account_segments:
action: update_approval_limit_account_segments
description:
flavor: 0
+online_help__index:
+ id: 91013