Skip to content

Instantly share code, notes, and snippets.

View carlisia's full-sized avatar
:octocat:
🎉 ‼️ 🙋‍♀️ 😜 👀 🌟 🌈 ☀️ 💯

Carlisia Campos carlisia

:octocat:
🎉 ‼️ 🙋‍♀️ 😜 👀 🌟 🌈 ☀️ 💯
View GitHub Profile
@carlisia
carlisia / gist:9604784
Created March 17, 2014 18:01
Seeking fullstack tech team
Backend: Express (node.js) based service using mongoose for object-document modelling.
Frontend: angular.js, along with several node.js modules.
@carlisia
carlisia / gist:1ac550b1c1ddd1a6f577
Created May 30, 2014 12:48
Completed 401 Unauthorized - in Deals
~/dev/deals
☻ tail -f log/development.log ruby-1.9.3p484 master 1526ca4 ✗
Cache fetch_hit: iso_code_whitelist ({:expires_in=>3600 seconds, :force=>false}) [trace_id=1401391554_WuUCIP]
Cache fetch_hit ==> iso_code_whitelist (0.0ms) [trace_id=1401391554_WuUCIP]
Cache read: iso_code_whitelist ({:expires_in=>3600 seconds, :force=>false}) [trace_id=1401391554_WuUCIP]
Cache read ==> iso_code_whitelist (0.0ms) HIT [trace_id=1401391554_WuUCIP]
Cache fetch_hit: iso_code_whitelist ({:expires_in=>3600 seconds, :force=>false}) [trace_id=1401391554_WuUCIP]
Cache fetch_hit ==> iso_code_whitelist (0.0ms) [trace_id=1401391554_WuUCIP]
Started request_method="POST" request_url=""http://lsdev.co/api/v3/merchant/vouchers/37528807/redemption.json?amount_paid_at_redemption=0.0"" at request_time="2014-05-29 12:25:55 -0700" request_ip="127.0.0.1" headers: HTTP_USER_AGENT="Ruby" params: accept="json" content_type="json" X-LivingSocial-API-Key="2fda5d

Trouble-Free Bundler

Every couple of weeks, I hear someone complaining about some difficulties with Bundler. Yesterday, it happened twice. But somehow I just never have those difficulties. I'm not saying Bundler is perfect; certainly in its early days it wasn't even close. But for the past two years it's been incredibly solid and trouble-free for me, and I think a large part of the reason is the way I use it. Bundler arguably does too much, and just as with Git, a big part of it is knowing what not to do, and configuring things to avoid the trouble spots.

# Original Rails controller and action
class EmployeesController < ApplicationController
def create
@employee = Employee.new(employee_params)
if @employee.save
redirect_to @employee, notice: "Employee #{@employee.name} created"
else
render :new
end
[11:18]
carlisia
does anyone here know how i can transfer data from my local db to my production db?
zapnap
if the database itself is different (sqlite vs mysql for instance) you will have to do a bit of data conversion to do so
[11:21]
carlisia
with a visual tool (GUI) i know how that can be done. i haven't tried, could i hook up my mysql GUI tool to my db on linode? i can't see why not, but just checking
[11:22]
SuttoL
def load_classifier(name)
# load energetic classifier
labels = Bayes.find(:all,
:select => "category",
:conditions => ["classifier = ? AND word is NULL AND count is NULL", name])
str_labels = []
labels.each do |l|
str_labels << l.name
end
require File.dirname(__FILE__) + '/../test_helper'
class PhotoTest < ActiveSupport::TestCase
# FIXME: http://thoughtbot.lighthouseapp.com/projects/8794/tickets/35-should_have_attached_file - AVS
should_have_attached_file :image
should_belong_to :property
end
Scenario: Conference organizer tracks if enough attendees signup
Given a total of max-10 attendees
When 10 attendee registers
Then I should get an email notifying seating has been complete
Scenario: Conference organizer tracks if venue needs to be changed to accommodate more attendees
Given a total of max attendees
When 1 attendee registers
Then I should get an email notifying a new venue needs to be arranged
When new venue is selected
@carlisia
carlisia / gist:5a72474113f15674ac1e
Created September 2, 2015 02:05
GO package management
.
@carlisia
carlisia / gist:e0019776fc6db368f1dc
Created September 5, 2015 23:50
cat commands/labyrinth.go
~/devgo/src/github.com/carlisia/gc6-carlisia
☻ cat commands/labyrinth.go ruby-2.2.0p0 master 109bbc4 ✗
// Copyright © 2015 Steve Francia <spf@spf13.com>.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//