This file contains hidden or 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
''' | |
An example of how to create a VSI from the SL python library | |
''' | |
from __future__ import print_function | |
import SoftLayer | |
from SoftLayer.managers.vs import VSManager | |
# For nice debug output: | |
from pprint import pprint as pp |
This file contains hidden or 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
# 52 cards print them line by line | |
def setup_players | |
players = [] | |
playersNumber = (2..10).to_a.sample | |
playersNumber.times do |player| | |
players << [] | |
end | |
players | |
end |
This file contains hidden or 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
{ | |
"browser": true, | |
"node": true, | |
"predef": ["_", "Backbone", "define", "require", "$", "db", "app", "bn", "backfin", "d3", "confirm", "alert", "window", "document", "describe", "assert", "beforeEach","afterEach","it", "sinon", "module"], | |
"es5": true, | |
"undef": true, | |
"unused": true, | |
"evil": true, | |
"camelcase":true, | |
"bitwise":true, |
This file contains hidden or 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
@mixin sprite-background($name, $folder, $sprite-width) { | |
$sprites: sprite-map("#{$folder}/*.png"); | |
$sprites-retina: sprite-map("#{$folder}@2x/*.png"); | |
background-image: sprite-url($sprites); | |
background-position: sprite-position($sprites, $name); | |
background-repeat: no-repeat; | |
display: inline-block; | |
height: image-height(sprite-file($sprites, $name)); | |
width: image-width(sprite-file($sprites, $name)); |
This file contains hidden or 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
$ irb | |
>> require 'rubygems' | |
=> false | |
>> require 'pg' | |
LoadError: dlopen(/usr/local/lib/ruby/gems/1.8/gems/pg-0.8.0/lib/pg.bundle, 9): no suitable image found. Did find: | |
/usr/local/lib/ruby/gems/1.8/gems/pg-0.8.0/lib/pg.bundle: mach-o, but wrong architecture - /usr/local/lib/ruby/gems/1.8/gems/pg-0.8.0/lib/pg.bundle | |
from /usr/local/lib/ruby/gems/1.8/gems/pg-0.8.0/lib/pg.bundle | |
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' | |
from (irb):2 | |
>> |
This file contains hidden or 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
=> Booting Thin | |
=> Rails 2.3.2 application starting on http://0.0.0.0:3000 | |
/Users/justin/Projects/Soocial/webapp/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:76:in `establish_connection': Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (dlopen(/usr/local/lib/ruby/gems/1.8/gems/pg-0.8.0/lib/pg.bundle, 9): no suitable image found. Did find: (RuntimeError) | |
/usr/local/lib/ruby/gems/1.8/gems/pg-0.8.0/lib/pg.bundle: mach-o, but wrong architecture - /usr/local/lib/ruby/gems/1.8/gems/pg-0.8.0/lib/pg.bundle) | |
from /Users/justin/Projects/Soocial/webapp/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:60:in `establish_connection' | |
from /Users/justin/Projects/Soocial/webapp/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in `establish_connection' | |
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:417:in |
This file contains hidden or 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
def login_as(user) | |
request.session[:account_id] = user ? users(user).id : nil | |
end |
NewerOlder