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
# routes/instructor/courses.rb | |
module Instructor | |
class Courses < Cuba | |
define do | |
on 'courses/:permalink/edit' do |permalink| | |
on get do | |
course = Course.find_by_permalink( permalink ) |
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
# C-a :source .screenrc | |
termcapinfo xterm* ti@:te@ | |
term screen-256color | |
startup_message off | |
vbell off | |
autodetach on | |
altscreen on | |
shelltitle "$ |bash" | |
defscrollback 10000 |
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
When(/^the user selects "(.*?)" question$/) do |question_prompt| | |
selected_questions = find('#selected-questions') | |
within('#unselected-questions') do | |
find(".question-prompt").drag_to selected_questions | |
end | |
sleep(3) | |
save_and_open_page | |
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
#!/bin/bash | |
source `su - root -c env` | |
cd /opt/rails && bundle exec rake referrals:expire_and_resolve >> /var/log/cron.log 2>&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
[cron0] Apr 13 14:49:06 c3b8c663f095 kernel: [25036640.642917] nf_conntrack: falling back to vmalloc. | |
[cron0] Apr 13 14:49:06 c3b8c663f095 kernel: [25036640.703836] IPv6: ADDRCONF(NETDEV_UP): vethca35: link is not ready | |
[cron0] Apr 13 14:49:07 c3b8c663f095 kernel: [25036641.536769] IPv6: Neighbour table overflow | |
[cron0] Apr 13 14:49:07 c3b8c663f095 kernel: [25036641.536835] IPv6: Neighbour table overflow | |
[cron0] Apr 13 14:49:07 c3b8c663f095 kernel: [25036641.536950] IPv6: Neighbour table overflow | |
[cron0] Apr 13 14:49:10 c3b8c663f095 kernel: [25036644.300650] docker0: port 36(vethffe8) entered disabled state | |
[cron0] Apr 13 14:49:10 c3b8c663f095 kernel: [25036644.301540] device vethffe8 left promiscuous mode | |
[cron0] Apr 13 14:49:11 c3b8c663f095 kernel: [25036645.106033] device vethaec2 left promiscuous mode | |
[cron0] Apr 13 14:49:11 c3b8c663f095 kernel: [25036645.107692] device veth234d left promiscuous mode |
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
RUBYGEMS.ORG | |
============= | |
* Hostname was NOT found in DNS cache | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 54.186.104.15... | |
* Connected to rubygems.org (54.186.104.15) port 80 (#0) | |
> GET /api/v1/dependencies?gems=sinatra HTTP/1.1 | |
> User-Agent: curl/7.38.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
Jardin nro 281: | |
4972413 15 al 19 | |
fotocopia dni del alumno | |
y de los padres. | |
fotocopia del carnet de vacuna | |
original: |
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
dpkg: dependency problems prevent processing triggers for dbus: | |
dbus depends on libdbus-1-3 (>= 1.7.6); however: | |
Package libdbus-1-3:amd64 is not configured yet. | |
dpkg: error processing package dbus (--configure): | |
dependency problems - leaving triggers unprocessed | |
dpkg: dependency problems prevent processing triggers for dbus: | |
dbus depends on libdbus-1-3 (>= 1.7.6); however: | |
Package libdbus-1-3:amd64 is not configured yet. |
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 'spreadsheet' | |
class CategoryXls | |
def initialize(file_path) | |
@file_path = file_path | |
end | |
def import | |
read( @file_path ) do |sheet, row| |
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 self.import(file) | |
CSV.foreach(file, headers: true) do |row| | |
csv = row.to_hash | |
#default values | |
order_type = csv["Shipping Method"].to_s.include?('Pickup') || csv["Shipping Method"].to_s == '' ? | |
0 : 1 | |
order_date = csv["Fulfilled at"].to_s == '' ? Time.now : | |
DateTime.strptime(csv["Fulfilled at"].to_s, "%m/%d/%Y %H:%M") |