This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); | |
xmlhttp.open("POST","http://server/path/here/page_her.aspx", false, "user_name_here", "secret_pass_here"); | |
xmlhttp.send("<Root><Node><Param Id=\"0EBFAE2E-40EE-11E0-A8BC-0019B9B66271\"/></Node></Root>"); | |
WScript.Echo(xmlhttp.responseXML.xml); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autocmd BufEnter *.markdown,*.md exe 'noremap <F5> :!start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" %:p<CR>' | |
let NERDTreeWinSize=20 | |
if has("gui_running") | |
set lines=50 columns=105 | |
:winpos 800 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SimpleThread extends Thread { | |
private int countDown = 5; | |
private boolean triggerExceptions = false; | |
public SimpleThread( boolean enableHandler, boolean triggerExceptions) { | |
super("Error Test"); // Store the thread name | |
this.triggerExceptions = triggerExceptions; | |
if (enableHandler) setHandler(); | |
start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::buffered::BufferedReader; | |
use std::io; | |
fn get_name() -> ~str { | |
println!("What is your first name?"); | |
let mut reader = BufferedReader::new(io::stdin()); | |
let name = reader.read_line().unwrap_or(~"nothing"); | |
return name.trim().to_str(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* CoffeeBot Command: Control a coffeebot with a remote or via sensors | |
* Version 0.1 - August, 2013 | |
* By Ed Botzum | |
* http://edbotz.us | |
* This is an arduino scrip that allows users to switch their coffeebot | |
* between senor mode and Remote Mode by clicking the func/stop button | |
* on the remote. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -wKU | |
require 'fileutils' | |
def fix_frank(dir_name) | |
Dir.new(dir_name).each do |file_name| | |
file_path = File.join dir_name, file_name | |
index_path = File.join file_path, 'index.txt' | |
if file_name == 'data' and File.exist? index_path | |
puts " Checking for \"FRANK\" in #{index_path}" | |
franks = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
require 'zip/zip' | |
def unzip_file(file_name, dir_name) | |
puts "Unzipping #{file_name} to #{dir_name}." | |
Zip::ZipFile.open(file_name) do |zip_file| | |
zip_file.each do |f| | |
f_path=File.join(dir_name, f.name) | |
FileUtils.mkdir_p(File.dirname(f_path)) | |
zip_file.extract(f, f_path) unless File.exist?(f_path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'FileUtils' | |
tag_files = {} | |
Dir.glob( './upload/*.tag' ).each do |file| | |
name = File.basename file, '.tag' | |
fields = name.split '_' | |
name = fields[fields.length - 1] | |
tag_files[name] = [] if tag_files[name].nil? | |
tag_files[name] << file | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sys = require('sys'); | |
function playRandomSound() { | |
var num = Math.floor(Math.random()*13); | |
if (num == 0) { | |
num = "09"; | |
} | |
else if (num < 10) { | |
num = '0' + num; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MyDimmer | |
My hack of the script created by David Mellis, Tom Igoe and Scott Fitzgerald. | |
http://www.arduino.cc/en/Tutorial/Dimmer | |
The script to reads bytes of input from the serial port and uses it to contol the brightness of an LED on pin 9. | |
Mine lights an additional indicator LED on pin 7 as an indicator. | |