Skip to content

Instantly share code, notes, and snippets.

View gotchahn's full-sized avatar

Carlos Gochez gotchahn

View GitHub Profile
@gotchahn
gotchahn / alexa.js
Created September 28, 2017 23:26
Alexa Test
"use strict";
// Include the Alexa SDK
var Alexa = require("alexa-sdk");
// The handlers object tells Alexa how to handle various actions
var handlers = {
//Our skill will receive a LaunchRequest when the user invokes the skill with the invocation name, but does not provide any command mapping to an intent. For example, open codecademy
"LaunchRequest": function () {
this.emit(":tell", "Welcome to Codecademy"); // Create speech output. This is what Alexa will speak back when the user says "Open code academy"
describe "Rio 2016", :type => :feature do
let(:h_sub23){ Honduras.new }
describe "Honduras" do
it "debe pasar de la fase de grupos" do
visit rio_path
expect(h_sub23.goles).to be > 1
expect(h_sub23).to be_primeros_2
end
@gotchahn
gotchahn / Moving Dataclips.md
Last active June 3, 2016 22:11
How Move All Dataclips

Getting the data

Follow the instructions to grab the right urls posted here

  1. curl https://dataclips.heroku.com/api/v1/clips -H ‘Cookie: xxx’ | pbcopy
  • To get all the url, use chrome->inspect->network on the index dataclip page.
  • Right click on the clips resource and then select copy as cURL
  1. Open the rails console or IRB
  2. clips = JSON.parse %(paste the index response)
  3. sms=clips.select{|clip| clip["heroku_app_name"]=="servemanager-pro"}
  4. slugs = sms.map{|clip| clip["slug"]}
@gotchahn
gotchahn / gist:4fb00ad93c815762c739
Created April 17, 2015 17:42
PostgreSQL Failures and How Solve them
1) see what log says in /usr/local/var/postgres/server.log `tail -f /usr/local/var/postgres/server.log`
Problemas
---------
1) Si es lo de FATAL postmaster.pid > `rm /usr/local/var/postgres/postmaster.pid` y luego correrlo con `launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist`