Skip to content

Instantly share code, notes, and snippets.

var Qs = require('qs');
var request = require('request');
//
// var SLACK_TEST_URL = 'https://slack.com/api/chat.postMessage?token=<<MY-TOKEN>>&channel=%23review-bot-test&attachments=%5B%20%20%20%20%20%20%20%20%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%22fallback%22%3A%20%22ReferenceError%20-%20UI%20is%20not%20definied%3A%20https%3A%2F%2Fhoneybadger.io%2Fpath%2Fto%2Fevent%2F%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Chttps%3A%2F%2Fhoneybadger.io%2Fpath%2Fto%2Fevent%2F%7CReferenceError%3E%20-%20UI%20is%20not%20defined%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%22fields%22%3A%20%5B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22title%22%3A%20%22Project%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22Awesome%20Project%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22short%22%3A%20true%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%20%20%20%20
{ feed:
{ author: { name: [Object], uri: [Object] },
entry:
[ [Object],
[Object],
[Object],
[Object],
[Object],
[Object],
[Object],
{
"title": "SnipSnap Coupon App - SnipSnap",
"description": "<table border=\"0\" width=\"100%\">\n <tr>\n <td>\n <table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n <tr valign=\"top\" align=\"left\">\n \n <td align=\"center\" width=\"166\" valign=\"top\">\n <a href=\"https:\/\/itunes.apple.com\/us\/app\/snipsnap-coupon-app\/id516439697?mt=8&uo=2\"><img border=\"0\" alt=\"SnipSnap - SnipSnap Coupon App artwork\" src=\"http:\/\/is1.mzstatic.com\/image\/pf\/us\/r30\/Purple5\/v4\/1f\/e7\/14\/1fe7143c-5a3d-56fe-c195-99ec20b9f673\/mzl.vgqdbioy.100x100-75.png\" \/><\/a>\n <\/td>\n <td width=\"10\"><img alt=\"\" width=\"10\" height=\"1\" src=\"https:\/\/s.mzstatic.com\/images\/spacer.gif\" \/><\/td>\n \t<td width=\"95%\">\n \n \n <b><a href=\"https:\/\/itunes.appl
0x08048f78 <+0>: push %ebp
0x08048f79 <+1>: mov %esp,%ebp
0x08048f7b <+3>: sub $0x38,%esp
0x08048f7e <+6>: movl $0x80bf20c,(%esp)
0x08048f85 <+13>: call 0x804f800 <printf>
0x08048f8a <+18>: lea -0x20(%ebp),%eax
0x08048f8d <+21>: mov %eax,(%esp)
0x08048f90 <+24>: call 0x804fd60 <gets>
0x08048f95 <+29>: lea -0x20(%ebp),%eax
0x08048f98 <+32>: mov %eax,0x4(%esp)
  1. Navgigate to whichever directory you want your VM to be accessible
  2. vagrant init ubuntu/trusty64
  3. vagrant up
  4. vagrant ssh
  • Now you are in your ubuntu VM
  1. sudo apt-get update
  2. sudo apt-get install build-essential
  3. cd /vagrant/
  • This is where all of your local files (of the direcrory where you put the VM) are located
@samuelcouch
samuelcouch / gist:4092155
Created November 17, 2012 00:24
Program to calculate the mean and standard deviation of a set of inputs from a file. Created for CSCI course by Sam Couch
#include <iostream>
#include <iomanip>
#include <cmath>
#include <fstream>
#include <string>
//------------------------------------------------------------------------------
using namespace std;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
bool GetInputOpenFile(ifstream &inFile, string &name);
@samuelcouch
samuelcouch / gist:4027378
Created November 6, 2012 20:41
Twitter Search and Display
from twython import Twython
search_list = ['OMGrobots', 'FRC', 'FIRST Robotics', 'Dean Kamen']
# For the sake of testing, added more search terms
for tweet_keyword in search_list:
twitter = Twython()
search_results = twitter.search(q=tweet_keyword, rpp="100")
@samuelcouch
samuelcouch / MissionSol.rb
Created October 30, 2012 08:49
Curiosity & Opportunity Mission Sol Count
#Ruby code ported by Sam Couch, original inspiration -> https://github.com/jtauber/mars-clock
millis = (Time.now.to_f)*1000
jd_ut = (2440587.5 + (( millis ) / ((8.64)*(10**7))))
jd_tt = (jd_ut + (35 + 32.184) / 86400)
j2000 = jd_tt - 2451545.0
msd = (((j2000 - 4.5) / 1.027491252) + 44796.0 - 0.00096)
mtc = ((24 * msd) % 24)
curiosity_lambda = 360 - 137.4
curiosity_sol = (((msd - curiosity_lambda / 360).floor) - 49268)