[ Launch: sin waves animated ] 6473182 by ejfox See Previous Inlet [ Gist ]
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
date | num_customers | distinct_customers | total_bananas | total_revenue | revenue_per_sale | |
---|---|---|---|---|---|---|
2016-01-01 | 345 | 287 | 564 | 3689 | 6.54 | |
2016-01-02 | 364 | 299 | 582 | 4080 | 7.01 | |
... | ... | ... | ... | ... | ... |
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
package com.crowdlab.deserializers; | |
import com.google.gson.JsonElement; | |
import com.google.gson.JsonObject; | |
public class DeserializerHelper { | |
private JsonObject mJsonObject; | |
public DeserializerHelper(JsonObject obj) { |
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
# config/routes.rb | |
resources :documents do | |
scope module: 'documents' do | |
resources :versions do | |
post :restore, on: :member | |
end | |
resource :lock | |
end | |
end |
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 Ticket < ActiveRecord::Base | |
belongs_to :grouper | |
belongs_to :user | |
validate :user_cant_be_blacklisted, on: :confirmation | |
validate :user_cant_double_book, on: :confirmation | |
validate :grouper_cant_be_full, on: :confirmation | |
validate :grouper_cant_have_occurred, on: :confirmation |
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 | |
echo "--------------------------------------------------------------------------------" | |
uname -a | |
echo "--------------------------------------------------------------------------------" | |
MEMORY=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print $1 $2 $3}'` | |
echo "$MEMORY" | |
echo "--------------------------------------------------------------------------------" | |
CORES_COUNT=`sysctl hw.ncpu | awk '{print $2}'` | |
echo "CPU" | |
sysctl -n machdep.cpu.brand_string |
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
# Requirements | |
# | |
# Create a new list | |
# Add an item with a quantity to the list | |
# Remove an item from the list | |
# Update quantities for items in your list | |
# Print the list (Consider how to make it look nice!) | |
# Pseudocode |
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
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1
or
WARNING: Nokogiri was built against LibXML version 2.9.1, but has dynamically loaded 2.9.0
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/sh | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' |
NewerOlder