Skip to content

Instantly share code, notes, and snippets.

View acrymble's full-sized avatar

Adam Crymble acrymble

  • London
View GitHub Profile
@acrymble
acrymble / hello-world-embedded.js
Created June 28, 2011 15:33
hello-world-embedded.js
<!doctype html>
<html dir="ltr" lang="en-US">
<head>
<title>Hello World! Script</title>
</head>
<body>
<script type="text/javascript">
document.write("Hello World!");
@acrymble
acrymble / string-example.py
Created June 30, 2011 09:06
python string example
message1 = 'hello world'
message2 = "hello world"
message3 = """hello
hello
hello world"""
@acrymble
acrymble / python-bad-string.py
Created June 30, 2011 09:07
python bad string example
message1 = "hello world'
message2 = 'hello world"
message3 = 'I can't eat pickles'
@acrymble
acrymble / python-escaped-string.py
Created June 30, 2011 09:08
python escaped string
message3 = 'I can\'t eat pickles'
@acrymble
acrymble / file-output.py
Created June 30, 2011 09:10
Hello World to file.py
# file-output.py
f = open('helloworld.txt','w')
f.write('hello world')
f.close()
@acrymble
acrymble / python-file-output-win.py
Created June 30, 2011 09:21
Python File Output message win
'C:\Python27\Python.exe file-output.py' returned 0.
@acrymble
acrymble / file-input.py
Created June 30, 2011 09:24
Python read file
# file-input.py
f = open('helloworld.txt','r')
message = f.read()
print message
f.close()
@acrymble
acrymble / file-append.py
Created June 30, 2011 09:26
Python File Append
# file-append.py
f = open('helloworld.txt','a')
f.write('\n' + 'hello world')
f.close()
@acrymble
acrymble / greet.py
Created June 30, 2011 09:29
Python Function example
# greet.py
def greetEntity (x):
print "hello " + x
greetEntity("Everybody")
greetEntity("Programming Historian")
@acrymble
acrymble / greet.py
Created June 30, 2011 09:36
Python Function example 2
# greet.py
def greetEntity (x):
print "hello " + x