Skip to content

Instantly share code, notes, and snippets.

View kingbin's full-sized avatar
🎯
Focusing

kingbin

🎯
Focusing
View GitHub Profile
@kingbin
kingbin / gist:766984
Created January 5, 2011 20:52
Calling webservice and filling select tag with returned options
$(document.getElementsByName("Lic")).click(function () {
//this.checked;
//$('#ShiftID').html('<option value="TEST">TEST</option>')
$.getJSON("/ResourcePoolND/NurseRequest/UpdateShifts?Value=" + this.checked, function (data) {
$("#ShiftID").html(data);
});
});
@kingbin
kingbin / gist:806536
Created February 1, 2011 19:57
pharmacy changes
okay...I think visit number, patient name, order info, reason, comment, request dt/tm,
View:
request prsnl, patient Name, unit/room/bed
Edit:
request prsnl query from cerner
code_Value is in our data mart
runas /user:REQUIREDUSERNAME /savecred c:\SECONDBATCH.BAT
@kingbin
kingbin / backuptheBacon.bat
Created September 2, 2011 14:50
windows quick script, backup contents of folder and retain for 30 days.
xcopy "c:\DIR_TO_BKUP\*.*" c:\Backup\*.* /e /h /r /y
7za a -tzip ourdatafile.zip "c:\Backup"
rename ourdatafile.zip ourdatafile.%Date:~-4,4%%Date:~-10,2%%Date:~-7,2%.zip
move ourdatafile.%Date:~-4,4%%Date:~-10,2%%Date:~-7,2%.zip "c:\ProgramData\bkups"
forfiles -p "c:\ProgramData\bkups" -s -m *.* -d 30 -c "cmd /c del @path"
@kingbin
kingbin / polldaddy.rb
Created January 27, 2012 18:03
http requests to auto vote on a polldaddy poll
require 'open-uri'
pollNumber = '5876349'
ourPick = '26523547'
uriString = 'http://polldaddy.com/n/64270c358614e8ef9383968590e82f73/'.concat(pollNumber).concat('?').concat(Time.now.to_i.to_s())
puts uriString
# Headers
HEADERS = {
'Host' => 'polldaddy.com',
'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7',
@kingbin
kingbin / polldaddy_v2.rb
Created January 29, 2012 16:33
automate testing a web project :)
# Using the web automation driver (watir-webdriver) through the tor network
# Automates webpage actions & bypasses the voting limit on polldaddy
# Casts a vote every 3 seconds for a total of 1000 votes
require 'watir-webdriver'
profile = Selenium::WebDriver::Firefox::Profile.new
profile.proxy = Selenium::WebDriver::Proxy.new :http => '127.0.0.1:8118'
b = Watir::Browser.new :firefox, :profile => profile
#b = Watir::Browser.new :firefox
b.goto 'speakimge.wordpress.com/2012/01/25/under-the-covers/'
#define TESTA
#define TESTB
#define TESTC
#define TESTD
#define TESTE
#define TESTF
#define TESTG
#define TESTH
#define TESTI
#define TESTJ
@kingbin
kingbin / gist:4091294
Created November 16, 2012 22:01
Backbone - Forcing IE to not cache collections
var myUnicorns = Backbone.Collection.extend({
...
fetch: function (options) {
options.cache = false;
return Backbone.Collection.prototype.fetch.call(this, options);
}
...
})
@kingbin
kingbin / gist:4542827
Created January 15, 2013 22:36
Execute exe as a different user
C:\Windows\System32\runas.exe /user:domain\user "C:\Program Files\Internet Explorer\iexplore.exe"
got gist.vim auth probs?
try git://github.com/mattn/webapi-vim.git
It's soo good for you!