This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require('webpack') | |
const { environment } = require('@rails/webpacker') | |
// Don't use commons chunk for server_side_render chunk | |
const entries = environment.toWebpackConfig().entry | |
const commonsChunkEligible = Object.keys(entries).filter(name => name !== 'server_side_render') | |
environment.plugins.set('CommonsChunkVendor', new webpack.optimize.CommonsChunkPlugin({ | |
name: 'vendor', | |
minChunks: (module, count) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Chnode < Formula | |
desc "Change between installed Node versions in your current shell." | |
homepage "https://github.com/steakknife/chnode" | |
url "https://github.com/steakknife/chnode/archive/v1.2.3.tar.gz" | |
sha256 "ae0bd1d9227ef76286d19331f9a3c5fcc1926e70f4ef0d3896a8f9f7b463c792" | |
head "https://github.com/steakknife/chnode.git" | |
def install | |
bin.install "chnode", "chnode-auto", "chnode-exec" | |
doc.install "README.md", "LICENSE", "CHANGELOG.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Wolfram = require('wolfram-alpha').createClient(process.env.HUBOT_WOLFRAM_APPID) | |
module.exports = (robot) -> | |
robot.catchAll (msg) -> | |
r = new RegExp "^(?:#{robot.alias}|#{robot.name}) (.*)", "i" | |
matches = msg.message.text.match(r) | |
if matches != null && matches.length > 1 | |
Wolfram.query matches[1], (e, result) -> | |
if result and result.length > 0 | |
msg.send result[1]['subpods'][0]['text'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.0.rc.2) | |
// Compass (v1.0.0.alpha.17) | |
// ---- | |
$turquoise: #000000; | |
$green-sea: #ffffff; | |
@mixin calc-color($first-color, $second-color) { | |
.palette-#{$first-color} { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module OSXCompat | |
OSX_REGEX = /darwin\d{2}/ | |
SNOW_KITTY = "darwin10" | |
class << self | |
def snow_kitty_or_lower? | |
if darwin? | |
osx_version <= SNOW_KITTY | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Rubinius | |
# Make this reload friendly without silly constant defined warnings. | |
BUILD_CONFIG = { | |
:command_line => "--prefix=/opt/rbenv/versions/rbx-2.0.0-dev --gemsdir=/opt/rbenv/versions/rbx-2.0.0-dev", | |
:which_ruby => :ruby, | |
:build_ruby => "/usr/bin/ruby1.9.1", | |
:build_rake => "rake", | |
:build_perl => "perl", | |
:llvm => :prebuilt, | |
:llvm_configure => "/tmp/ruby-build.20130613152938.5290/rubinius-2.0.0-dev/vendor/llvm/Release/bin/llvm-config", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Rubinius | |
# Make this reload friendly without silly constant defined warnings. | |
BUILD_CONFIG = { | |
:command_line => "--prefix=/opt/rbenv/versions/rbx-2.0.0-dev --gemsdir=/opt/rbenv/versions/rbx-2.0.0-dev", | |
:which_ruby => :rbx, | |
:build_ruby => "/opt/rbenv/versions/rbx-2.0.0-dev/bin/rbx", | |
:build_rake => "rake", | |
:build_perl => "perl", | |
:llvm => :prebuilt, | |
:llvm_configure => "/tmp/ruby-build.20130613144949.24356/rubinius-2.0.0-dev/vendor/llvm/Release/bin/llvm-config", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2013-03-07 14:14:35] INFO WEBrick 1.3.1 | |
[2013-03-07 14:14:35] INFO ruby 1.9.3 (2013-01-15) [x86_64-darwin12.3.0] | |
[2013-03-07 14:14:35] INFO WEBrick::HTTPServer#start: pid=54326 port=3000 | |
her version: 0.4.1 | |
localhost - - [07/Mar/2013:14:14:35 MST] "GET /users/1?foobar=true HTTP/1.1" 200 10 | |
- -> /users/1?foobar=true | |
localhost - - [07/Mar/2013:14:14:35 MST] "GET /users/1/projects HTTP/1.1" 200 10 | |
- -> /users/1/projects | |
[2013-03-07 14:14:35] INFO going to shutdown ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'multi_json' | |
module PostalCodeLookup | |
GEONAMES_URL = 'http://api.geonames.org/postalCodeSearchJSON' | |
def self.find_postal_code_data(code) | |
info = nil | |
begin | |
client = HTTPClient.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Airbrake.configure do |config| | |
# ... | |
if Rails.env.staging? | |
config.environment_name = `hostname -f`.strip | |
end | |
# ... | |
end |
NewerOlder