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> | |
int main(void) | |
{ | |
printf("Hello World\n"); | |
return 0; | |
} |
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
# Reusable temperature conversion function | |
def convert_temperature(to_scale, temperature): | |
if to_scale == "f" or to_scale == "F": | |
# Convert to Fahrenheit | |
return temperature * 9.0 / 5 + 32 | |
elif to_scale == "c" or to_scale == "C": | |
# Convert to Celsius | |
return (temperature - 32) * 5.0 / 9.0 | |
else: |
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
#!/bin/sh | |
export NATIVE_TOOLS="/accounts/1000/shared/documents/clitools" | |
export NATIVE_TOOLS_URL="http://halfnibble.com/bbdev/" | |
# Write the QNX_CONFIGURATION file | |
CONFFILE="etc/qnxconf/qconfig/qnx_blackberry_native_development_kit_2.1.0.xml" |
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
# Imports | |
import os | |
from decimal import Decimal | |
# Variables | |
my_name = 'Joshua D. Wedekind' | |
my_rate = Decimal('120.00') | |
current_dir = os.getcwd() | |
# Classes |
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
Creating test database for alias 'default'... | |
Got an error creating the test database: (1007, "Can't create database 'test_pna_demo'; database exists") | |
Type 'yes' if you would like to try deleting the test database 'test_pna_demo', or 'no' to cancel: yes | |
Destroying old test database 'default'... | |
s..........F......F..........F...F.........FFF.Fss..sF.F...FFF.FFF...FsFFF.FF....ss..FF....FF....F.FFFFFF..F..ss | |
====================================================================== | |
FAIL: test_on_delete (versions_tests.tests.test_models.DeletionHandlerTest) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/joshua/.envs/pna/local/lib/python2.7/site-packages/versions_tests/tests/test_models.py", line 244, in test_on_delete |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<style type="text/css"> | |
.wrapper { | |
width: 900px; | |
margin: 0 auto; | |
} | |
.left-bar { |
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
export var loadModule = function(module) { | |
// Trick Rollup.js to keep JavaScript. | |
let obj = { | |
method: function() {} | |
}; | |
obj.method(module); | |
}; | |
/* Example usage |
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
# Place in /installed_app/management/commands/cleandump.py | |
import os | |
from django.core import management | |
from django.core.management.base import BaseCommand, CommandError | |
class Command(BaseCommand): | |
help = 'Creates clean dumpdata fixtures.' |
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
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript | |
AddOutputFilterByType DEFLATE text/html text/plain text/xml | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/xml | |
</IfModule> |
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
// Caesar cipher +2 | |
var encoded_caesar = "vjg"tckp"kp"urckp"hcnnu"ockpn{"qp"vjg"rnckp"; | |
// Divisible by 2: +1, Divisible by 3: +3, Divisible by both: -1 | |
var fancy_cipher = "shf#ne`njqh nf!ojfd jv!41"; |
OlderNewer