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
Show hidden characters
{ | |
"compilerOptions": { | |
"forceConsistentCasingInFileNames": true, | |
"noImplicitReturns": true, | |
"strict": true, | |
"noUnusedLocals": true, | |
"strict": true, | |
"declaration": false, | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, |
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
"use strict"; | |
class Board { | |
constructor() { | |
this.width = 10; | |
this.height = 12; | |
this.grid = this._initializeToZeros(); | |
this.grid[2][1] = 1; | |
} |
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
# I've always disliked the way deprecation notices would appear while the test | |
# suite is running: they break up the neat little rows of dots (or F's, as it | |
# may be) which causes noise and makes the notices hard to read and understand. | |
# | |
# Adding this snippet to `config/environments/test.rb` will buffer all your | |
# deprecation notices until the end of the test run and keep your test output | |
# nice and tidy. | |
# | |
Rails.application.config do | |
# ... |
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
#! /usr/bin/env ruby | |
# this script can create a static build from virtually any rails' project. it | |
# has two simple requirements. | |
# | |
# 1) you have | |
# | |
# gem 'passenger' | |
# | |
# in your Gemfile |
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
#!/bin/bash | |
function gitroot { | |
if [ "$(pwd)" != "$(git rev-parse --show-toplevel)" ]; then | |
go-to-git-root | |
elif [ $(cd .. && git rev-parse --is-inside-work-tree &> /dev/null; echo $?) -eq 0 ]; then | |
cd .. && go-to-git-root | |
fi | |
} |
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
# MIT License: | |
# | |
# Copyright (C) 2012 Heroku, Inc. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of | |
# this software and associated documentation files (the "Software"), to deal in | |
# the Software without restriction, including without limitation the rights to | |
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
# of the Software, and to permit persons to whom the Software is furnished to do | |
# so, subject to the following conditions: |
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 'zeus/rails' | |
class Fixnum | |
def to_json(options = nil) | |
to_s | |
end | |
end | |
class CustomPlan < Zeus::Rails | |
def test |
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
#!/usr/bin/env ruby | |
require 'rails/generators' | |
require 'rails/generators/rails/app/app_generator' | |
require "active_support/core_ext/string/strip" | |
class CleverAppGenerator < Rails::Generators::AppGenerator | |
class_option :skip_bundle, default: true | |
class_option :database, default: "postgresql" | |
class_option :skip_test_unit, default: true, hide: true |
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
#!/bin/bash | |
# Bootstrap chef-solo on a server | |
# Install Ruby | |
sudo apt-get install ruby ruby-dev libopenssl-ruby rdoc ri irb build-essential wget ssl-cert curl | |
# Install RubyGems instead of using the system version | |
cd /tmp | |
curl -O http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz | |
tar zxf rubygems-1.8.10.tgz |
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
SALE RECEIPT | |
Store #11476 eat 01/07/10 16:01:48 | |
Subway Sandwiches & Salads | |
609 N MILPAS ST | |
MILPAS CA 93103 | |
805-966-3001 | |
Trans# 137 Clerk 3 RAJVINDERPAL | |
Dwr1 TRDT 010710 Reg-ID REG-MAIN | |
Receipt # 0000103913 | |
--- ITEM --- QTY PRICE MEMO PLU |
NewerOlder