Skip to content

Instantly share code, notes, and snippets.

View fivetwentysix's full-sized avatar
💭
yet another programmer

Patrick Ma fivetwentysix

💭
yet another programmer
View GitHub Profile
const path = require('path');
const glob = require('glob');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = (env, options) => ({
optimization: {
minimizer: [
pma@miner1:~$ clinfo
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [2]
param: 4, val: 0
Number of platforms: 2
Platform Profile: FULL_PROFILE
Platform Version: OpenCL 2.0 AMD-APP (2348.3)
Platform Name: AMD Accelerated Parallel Processing
DemoApp.PlayersShowController = Ember.ObjectController.extend
needs: 'application'
matches: (->
swords = []
# doesn't work ...
controllers.application.swordsPromise.then (data) ->
heroes = data
...
x 207313230.csv"Report Name: AdPerformanceReport_01_14_2013_12_11_12"
"Report Time: 2013"
"Time Zone: (GMT-08:00) Pacific Time (US & Canada); Tijuana"
"Last Completed Available Day: 1/14/2013 5:00:00 AM (GMT)"
"Last Completed Available Hour: 1/14/2013 5:00:00 AM (GMT)"
"Report Aggregation: Yearly"
"Report Filter: "
"Potential Incomplete Data: true"
"Rows: 0"
def options_from_hashes_for_select(hashes, value, display, selected=nil)
attributes = 'attr_accessor ' + hashes.first.map do |key, value|
"#{key.downcase.to_sym.inspect}"
end.join(', ')
eval <<-RUBY
class X
#{attributes}
end
RUBY
def approve
@payment.approve(current_user)
flash[:success] = "The payment has been approved."
if @payment.payment_requests.any?
redirect_to accounting_payment_requests_path
else
redirect_to payments_path(stage: "requisitions")
end
end
describe Item
describe "#received" do
it "should return the amount of goods received" do
receiving_records = mock_model(ReceivingRecord)
subject.stub(:receiving_records) { receiving_records }
receiving_records.stub(:sum).with(:quantity) { 3 }
subject.received.should == 3
end
end
end
require 'spec_helper'
describe "layouts/application.html.haml" do
it "should not render the current user" do
render
rendered.should_not have_selector("#current_user")
end
it "should render the current user when signed in" do
login_user(Factory(:user))
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.1)
actionpack (= 3.1.1)
mail (~> 2.3.0)
actionpack (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
builder (~> 3.0.0)
WARNING: Can't mass-assign protected attributes: weekday, starting_time, closing_time
class WorkDay < ActiveRecord::Base
belongs_to :employment_datum
default_scope :order => "weekday ASC"
attr_accessor :starting_time
attr_accessor :closing_time
attr_accessible [:starting_time, :closing_time, :weekday, :work_days_attributes]