Skip to content

Instantly share code, notes, and snippets.

View jrm2k6's full-sized avatar

Jeremy Dagorn jrm2k6

View GitHub Profile
@jrm2k6
jrm2k6 / gist:1358189
Created November 11, 2011 14:58
Pull error
[ jrm2k6 - 09:57 AM - inventory ]$ git pull origin tucker
Enter passphrase for key '/home/jrm2k6/.ssh/id_rsa':
fatal: Couldn't find remote ref tucker
[ jrm2k6 - 09:57 AM - inventory ]$ fatal: The remote end hung up unexpectedly
@jrm2k6
jrm2k6 / xhr_request_coffeescript
Created June 11, 2012 23:30
xhr request coffeescript
(exports ? this).get_pictures_from_tags = () ->
url_img = []
for tag in tags
url_img.push(get_pictures_from_tag tag)
console.log url_img
return
get_pictures_from_tag = (elem) ->
req = new XMLHttpRequest()
ubuntu@ip-172-31-40-49:~$ ls -la ~/.ssh/
total 32
drwx------ 2 ubuntu ubuntu 4096 Jun 24 15:41 .
drwxr-xr-x 6 ubuntu ubuntu 4096 Jun 24 15:50 ..
-rw------- 1 ubuntu ubuntu 391 Jun 24 15:26 authorized_keys
-rw------- 1 ubuntu ubuntu 1675 Jun 24 15:37 id_rsa
-rw------- 1 ubuntu ubuntu 1675 Jun 24 15:41 id_rsa_heroku
-rw-r--r-- 1 ubuntu ubuntu 404 Jun 24 15:41 id_rsa_heroku.pub
-rw-r--r-- 1 ubuntu ubuntu 404 Jun 24 15:37 id_rsa.pub
-rw-r--r-- 1 ubuntu ubuntu 1326 Jun 24 15:45 known_hosts
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /Users/prezideveloper/.ssh/id_rsa (0x7f49d56359f0)
debug2: key: /home/ubuntu/.ssh/id_rsa_heroku (0x7f49d5635090)
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/prezideveloper/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug2: input_userauth_pk_ok: fp ab:05:50:bc:4e:d0:3d:a7:82:27:cc:82:5b:f1:05:62
debug1: Authentication succeeded (publickey).
Authenticated to heroku.com ([50.19.85.154]:22).
debug1: channel 0: new [client-session]
Host heroku
Hostname heroku.com
User git
IdentityFile ~/.ssh/id_rsa_heroku
[core]
repositoryformatversion = 0
filemode = true
bare = false
var cheerioURLContent = function(url) {
var t = rest.get(url).on("complete", function(result){
console.log(result);
return result;
});
return cheerio.load(t);
}
var loadUsingCheerio = function(result){
return cheerio.load(result);
}
var cheerioURLContent = function(url, callback) {
rest.get(url).on("complete", function(result){
callback(result);
});
}
var fs = require('fs');
var rest = require('restler');
var program = require('commander');
var cheerio = require('cheerio');
var HTMLFILE_DEFAULT = "index.html";
var CHECKSFILE_DEFAULT = "checks.json";
var URL_DEFAULT = "http://floating-waters-9907.herokuapp.com/";
var assertFileExists = function(infile) {
var instr = infile.toString();
var checkContentFromURL = function(contentFromUrl, checksfile) {
// t needs to be a function
var t = cheerioURLContent(contentFromUrl);
}
var cheerioURLContent = function(url) {
var t = rest.get(url).on("complete", function(result){
console.log(result);
});
console.log(typeof t);