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
enum Card { | |
Heart(i32), | |
Spade(i32), | |
Diamond(i32), | |
Club(i32), | |
} | |
impl Card { | |
fn value_to_string(&self, value: i32) -> String { | |
match value { |
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 ['media-uploader'], (MediaUploader) -> | |
class Rise.Views.Teach.Lessons.UploadContentModal extends MediaUploader.UploadModal | |
el: '#upload-modal' | |
FILE_TYPES: | |
'Content::Document': ['pdf'] | |
'Content::Media': ['video', 'audio'] | |
initialize: -> | |
setDefaults() |
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
def getElementBonus elementA, elementB | |
case [elementA, elementB] | |
when ['Fire', 'Life'] | |
return 3 | |
when ['Water', 'Fire'] | |
return 3 | |
when ['Life', 'Water'] | |
return 3 | |
else | |
return 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
#!/usr/bin/env ruby | |
require 'brewby' | |
Signal.trap("INT") { exit } | |
heat_reader, heat_writer = IO.pipe | |
heat_pid = fork do | |
heat_writer.close | |
adapter = Brewby::Outputs::Test.new | |
output = Brewby::HeatingElement.new adapter, pulse_range: 5000 |
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 file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by libffi configure 3.0.10, which was | |
generated by GNU Autoconf 2.68. Invocation command line was | |
$ /root/jffi/jni/libffi/configure --disable-static --with-pic=yes --disable-dependency-tracking | |
## --------- ## | |
## Platform. ## |
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
root@raspberrypi:~/brewby# jruby -J-Xmx200m bin/brewby start --config ~/.testbrewbyrc --recipe examples/brewby_recipe.rb | |
LoadError: Could not load FFI Provider: (NotImplementedError) FFI not available: null | |
See http://jira.codehaus.org/browse/JRUBY-4583 | |
require at org/jruby/RubyKernel.java:1082 | |
(root) at /usr/local/rvm/rubies/jruby-1.7.5/lib/ruby/shared/ffi/ffi.rb:69 | |
require at org/jruby/RubyKernel.java:1082 | |
(root) at /usr/local/rvm/rubies/jruby-1.7.5/lib/ruby/shared/ffi.rb:1 | |
require at org/jruby/RubyKernel.java:1082 | |
(root) at /usr/local/rvm/rubies/jruby-1.7.5/lib/ruby/shared/ffi.rb:1 | |
require at org/jruby/RubyKernel.java:1082 |
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 Course < ActiveRecord::Base | |
include Coursify::Publishable | |
include Coursify::Enrollable | |
enrollable_by :user | |
has_many :lessons | |
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
upstream nodejs_app { | |
server 127.0.0.1:8000; # change this to wherever Express is running | |
} | |
server { | |
listen 80; | |
server_name mlu.es; | |
location / { | |
try_files $uri @nodejs_app; |
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 Maestro | |
class Bootstrap | |
attr_reader :project_name, :org_name, :app_type | |
def initialize project_name, org_name, options = {} | |
@project_name = project_name | |
@org_name = org_name | |
@app_type = options[:type] | |
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
cadwallion@mediabox:~/Python-2.7.3$ sudo apt-get remove python | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following packages were automatically installed and are no longer required: | |
libgfortran3 libtidy-0.99-0 libblas3gf liblapack3gf | |
Use 'apt-get autoremove' to remove them. | |
The following packages will be REMOVED: | |
aisleriot alacarte apport apport-gtk apt-xapian-index aptdaemon apturl apturl-common at-spi brasero brasero-common byobu capplets-data checkbox checkbox-gtk command-not-found compiz | |
compiz-fusion-plugins-main compiz-gnome computer-janitor computer-janitor-gtk desktopcouch empathy empathy-common eog evince evolution evolution-couchdb evolution-data-server evolution-exchange |
NewerOlder