This file contains 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
<script language="JavaScript"> | |
<!-- begin hide | |
// Originally from http://raoulpop.com/2007/08/07/automatic-redirect-from-http-to-https/ | |
function SSLRedirect() | |
{ | |
if (window.location.protocol = "http:") | |
{ | |
var oldURL = window.location.hostname + window.location.pathname; | |
var newURL = "https://" + oldURL; | |
window.location = newURL; |
This file contains 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
javascript:$("div").show();$("#mw-sopaOverlay").hide(); |
This file contains 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
for teacher in teachers: | |
for course in courses: | |
if teacher.spec_ed_cert: | |
print course | |
else: | |
if course.student_set.spec_ed: | |
print course | |
print course.spec_ed | |
else: | |
print course |
This file contains 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
import struct | |
def parse(my_struct, my_string): | |
"""Takes a large string such as the following: | |
char record1[2]; | |
char record2[10]; | |
char record3[15]; | |
char record4[12]; | |
and a target string that represents the struct's data, and returns a | |
dict with the struct entries as keys and the unpacked data as values.""" |
This file contains 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
#include <stdio.h> | |
void modify_short(short *value) | |
{ | |
*value = 3; | |
} | |
int main(int argc, char *argv[]) { | |
short temp = 2; | |
modify_short(&temp); |
This file contains 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
#Creates a date with the format 12/25/2012 | |
:*?:;dt:: | |
FormatTime, CurrentDate,, MM/dd/yyyy | |
SendInput %CurrentDate% | |
return | |
#Creates a date with the format 20121225 | |
:*?:;idt:: | |
FormatTime, CurrentDate,, yyyyMMdd | |
SendInput %CurrentDate% |
This file contains 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
[1] pry(main)> require './detpd270' | |
Warning: NLS_LANG is not set. fallback to US7ASCII. | |
=> true | |
[2] pry(main)> c = Connection.instance.conn | |
=> #<OCI8:LUKENAX> | |
[3] pry(main)> c.exec('select * from dual') { |results| puts results } | |
X | |
=> 1 | |
[4] pry(main)> c.exec("select sysdate, to_char(sysdate, 'YYYYMMDD') from dual") { |results| puts results } | |
2013-02-01 12:50:06 -0500 |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "base-hadoop" | |
config.vm.box_url = "http://files.vagrantup.com/lucid64.box" | |
config.vm.provision :puppet do |puppet| | |
puppet.manifests_path = "manifests" | |
puppet.manifest_file = "base-hadoop.pp" |
This file contains 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
drafts://x-callback-url/create?text={{!Things}}%0A[[draft]]&action=List%20in%20Reminders&x-success=things://inbox |
This file contains 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
javascript:(function(){var objects=document.getElementsByTagName("object");for(i=0;i<objects.length;i++){data=objects[i].getAttribute("data");if(data.indexOf("pdf")!=-1)document.location=data;}})(); |
OlderNewer