Skip to content

Instantly share code, notes, and snippets.

View leviwilson's full-sized avatar

Levi Wilson leviwilson

  • Northwoods
  • Colorado, USA
View GitHub Profile

Poor Man's VPN

Create an AWS EC2 Linux Instance

  1. Sign into your AWS account console
  2. Choose an availability zone not in your area (like Oregon or something)
  3. Launch a new instance (just choose an Ubuntu instance). A t2.micro should be fine for this.
  4. You may have to create a new key pair if you haven't already. Name it and the download the file. Do not lose this as this <whatever>.pem file is what you'll use to access the instance.

SSH Tunnel Into It

Now that you have an EC2 instance running in some other area of the country, you will want to SSH tunnel into

require 'faraday'
require 'dotenv'
require 'json'
module MeaningCloud
def self.topics(options)
request :topics, options, lang: 'en', tt: 'ecr'
end
def self.sentiment(options)
myapp.controller('myController', ['myService', function (myService) {
$scope.autofillSearch; //Input field in HTML
$scope.findAutofill = function () {
myService.autofill($scope.autofillSearch)
.success(function (data) {
window.console.log('Yay! ' + data);
})
.error(function () {
window.console.log('BOOO!');
});
@leviwilson
leviwilson / README.md
Last active August 29, 2015 14:05
Kiwi Helper Class Question

Background

Warning: I do not know objective-c that well

I'm working in some specs. Sometimes I see an opportunity to use some test helpers to eliminate some duplication in my testing. I'd like to be able to create a helper class that is able to wrap some of these helper verification methods and re-use it to clean up some of my specs.

Problem

I don't have access to any of the should flavor of Kiwi verifications within my tester. I'm assuming because I'm not within the SPEC_BEGIN / SPEC_END (as those macros call other Kiwi methods).

The Question

class Object
def kill_puppies(how_many)
sleep how_many
end
end

Keybase proof

I hereby claim:

  • I am leviwilson on github.
  • I am leviwilson (https://keybase.io/leviwilson) on keybase.
  • I have a public key whose fingerprint is 3392 4A26 7AC8 21D5 9E80 802D 12C5 EA5D 4297 5CD8

To claim this, I am signing this object:

@leviwilson
leviwilson / .gitattributes
Created February 19, 2014 19:25
Default .gitattributes that the Git for Visual Studio plugin gives you.
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
class YourScreen
include Mohawk
def press_enter
w = Uia.find_element handle: adapter.window.handle # get the top-level window for this screen
t = w.find id: 'yourTextFieldId'
t.send_keys :enter
end
end
@leviwilson
leviwilson / Gemfile
Last active August 29, 2015 13:56
mohawk / uia gem setup
source 'http://rubygems.org'
# ...
gem 'mohawk', git: 'git://github.com/leviwilson/mohawk.git', branch: 'uia_gem'
gem 'uia', git: 'git://github.com/northwoodspd/uia.git'
# ...
*.csproj -text merge=union
*.sln -text merge=union