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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' | |
gem 'rails', github: 'rails/rails' |
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
.state('register', { | |
url: "/register", | |
templateUrl: "templates/register.html", | |
controller: 'RegisterCtrl', | |
onEnter: function ($state) { | |
//$state.go('app.playlists'); | |
} | |
}) |
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
.factory('machinesCache', function() { | |
var _model = {machines: null}; | |
return { | |
setMachines: function(data) { | |
_model.machines = data; | |
}, |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>homebrew.mxcl.mongodb</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/opt/mongodb/mongod</string> | |
<string>--config</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
# Store data in /usr/local/var/mongodb instead of the default /data/db | |
dbpath = /usr/local/var/mongodb | |
# Append logs to /usr/local/var/log/mongodb/mongo.log | |
logpath = /usr/local/var/log/mongodb/mongo.log | |
logappend = true | |
# Only accept local connections | |
bind_ip = 127.0.0.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
am.directive("showXeditable", function() { | |
return { | |
link: function(scope, element, attrs) { | |
if(attrs.isnew){ | |
scope.$editable.show(); | |
} | |
}, | |
require: 'editableText', | |
restrict: 'A', | |
priority: 1000 //ensure it runs AFTER editableText directive |
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
print(" A B C D E F G H") | |
for fila in range(8): | |
print(8-fila,end=" ") | |
for columna in range(8): | |
if columna%2 == fila%2: | |
print("\u25a1",end=" ") | |
else: | |
print("\u25a0",end=" ") | |
print(8-fila) | |
print(" A B C D E F G H") |
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
num=0 | |
print("ABCDEFGH") | |
for fila in range (0,8): | |
print(num,end="") | |
for columna in range (0,8): | |
if columna%2 == fila%2: | |
print("\u25a1",end="") | |
else: | |
print("\u25a0",end="") | |
print(num,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
num=0 | |
print("ABCDEFGH") | |
for fila in range (1,9): | |
print(num+1,end="") | |
for columna in range (1,9): | |
if columna%2 == fila%2: | |
print("\u25a1",end="") | |
else: | |
print("\u25a0",end="") | |
print(num+1,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 Movie < ActiveRecord::Base | |
belongs_to :channel | |
validate :does_not_overlap, :valid_times | |
def self.from_xml(xml) | |
id = xml.attr('id') #parse movie id | |
channel = Channel.find_by_codename(xml.child.name) #get the channel from db | |
name = xml.child.xpath('name').text #get name | |
start_time = parse_time(xml.child.xpath('start_time').text) | |
end_time = parse_time(xml.child.xpath('end_time').text) |
NewerOlder