Skip to content

Instantly share code, notes, and snippets.

View PunkChameleon's full-sized avatar

Nick Weingartner PunkChameleon

  • Philadelphia, PA
View GitHub Profile
@PunkChameleon
PunkChameleon / gist:a8fde5776852d07f6cba
Created April 1, 2015 13:41
Make All Pictures on Your Page Pictures of Martyn
var allImages = document.getElementsByTagName("img"),
x,
singleImage;
for (x = 0; x < allImages.length; x++) {
singleImage = allImages[x];
singleImage.src = 'https://media.licdn.com/media/p/3/000/033/0e2/1312368.jpg';
}
.................................,,,,,,,,,:,,,:,:,:.............................
.............................:::,,,,,,,,::::::::::::::..........................
..........................:::::::::::::::::~::::::,,,::::.......................
........................:::::::::::::::::~~:~~~::::::,:,,::.....................
.....................~::~~~~~~~=====~==~~~=~=:=:~::~::,,:,:::...................
....................~~+==~~~~======+=+++++??I??~=~~:~::::,:,:,~.................
...................=+===~~~====+==+=+++++??IIIII??+++=:::::,:::::...............
..................++===~~~~~========+++??IIIIIII???+?++===:::::,::..............
................~?+==~~~~~~~=====++++????I?II77I??????+=+===~::::::~............
@PunkChameleon
PunkChameleon / vagrant
Created June 13, 2014 18:43
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "windows8" do |windows|
windows.vm.box_url = "https://url.windows.box"
{
"params" : {
"DF_PARAM" : "Web"
}
}
// Before
var response = {
"vals" : [
'picklist',
'values',
'here'
]
}
// After
*** LOCAL GEMS ***
addressable (2.3.6)
bigdecimal (1.2.0)
builder (3.2.2)
bundler (1.6.2)
bundler-unload (1.0.2)
capybara (2.2.1)
capybara-screenshot (0.3.19)
capybara-webkit (1.1.0, 1.0.0)
@PunkChameleon
PunkChameleon / gist:11197701
Created April 22, 2014 23:18
Cash v Reg T
Cash
An IB Cash account requires the account holder to have enough cash in the account to cover the cost of the transaction plus commissions. You cannot borrow to support trading in a Cash account. In addition, the following rules apply:
Shorting of stock is not allowed.
Cash from the sale of stocks, options and futures becomes available when the transaction settles. For example, US stock - three days, German stock - two days, US options - one day.
Intraday futures margin benefits (50% of regular margin requirements during the day, on certain exchanges), are not supported.
Limited purchase and sale of options are allowed.
The account may trade in multiple currencies, but must have the settled cash balance to enter trades.
Existing cash account holders can upgrade to a multi-currency cash account through Account Management.
Cash accounts may be upgraded to Reg T Margin accounts
Started by user anonymous
Building in workspace /var/lib/jenkins/jobs/Cucumber Test Suite/workspace
Fetching changes from the remote Git repository
Fetching upstream changes from https://github.MyCompany.com/MyCompany/gt-dev-ops
using .gitcredentials to set credentials
Checking out Revision bd68a89427807820c8eaa6aa7f1194bec9a21ebf (origin/master)
[workspace] $ /bin/bash -xe /tmp/hudson8838957792328151895.sh
+ cd qa/CucumberScripts/MyProject/
+ gem install bundler --no-rdoc --no-ri
/tmp/hudson8838957792328151895.sh: line 9: gem: command not found
@PunkChameleon
PunkChameleon / gist:10920679
Created April 16, 2014 18:58
Intern phantom error
➜ phantomjs-example git:(master) npm test
> phantomjs-example@0.1.0 test /Users/nickweingartner/git-projects/intern-examples/phantomjs-example
> intern-runner config=tests/intern
Defaulting to "runner" reporter
Listening on 0.0.0.0:9000
Error: connect ECONNREFUSED
at errnoException (net.js:901:11)
at Object.afterConnect [as oncomplete] (net.js:892:19)
@PunkChameleon
PunkChameleon / gist:10920167
Created April 16, 2014 18:53
Npm install for intern
npm WARN package.json phantomjs-example@0.1.0 No repository field.
npm http GET https://registry.npmjs.org/intern
npm http 304 https://registry.npmjs.org/intern
npm http GET https://registry.npmjs.org/intern/-/intern-1.5.0.tgz
npm http 200 https://registry.npmjs.org/intern/-/intern-1.5.0.tgz
npm ERR! Error: shasum check failed for /var/folders/0l/ttdvm6qn3hbdwsv6tps801zr0000gn/T/npm-6174-SuZ9Q4W6/1397674091982-0.10979399201460183/tmp.tgz
npm ERR! Expected: 7a8f27b236a32da18835cf697036612d5f92071e
npm ERR! Actual: 8dcfe69d8f32410f5ab59ff7417a97636db15f6c
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR! at ReadStream.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:85:7)