Skip to content

Instantly share code, notes, and snippets.

View markormesher's full-sized avatar
🚀

Mark Ormesher markormesher

🚀
View GitHub Profile
@markormesher
markormesher / kcltechpins.php
Created March 28, 2015 11:56
KCL Tech Election PIN Sender
<?php
// init mailer
require('/usr/share/php/Mail.php');
$factory =& Mail::factory('smtp',
array(
// SMTP auth info removed
)
);
$headers['From'] = 'Mark Ormesher <[email protected]>';
@markormesher
markormesher / RpsDemo
Created October 9, 2014 19:01
Rock/paper/scissors Python demo
done = False
while (done != True):
their_move = raw_input("What is your move? [r|p|s|q] ")
if (their_move == "r"):
print "You choose rock, I choose paper"
elif (their_move == "p"):
print "You choose paper, I choose scissors"
elif (their_move == "s"):
print "You choose scissors, I choose rock"
elif (their_move == "q"):
@markormesher
markormesher / GetSmallCapsString.java
Last active November 21, 2023 19:13
Create a small-caps spannable string that will work with any font
/**
* Produce a formatted SpannableString object from a given String
* input, with all lowercase characters converted to smallcap
* characters. Uses only standard A-Z characters, so works with
* any font.
*
* @param input The input string, e.g. "Small Caps"
* @return A formatted SpannableString, e.g. "Sᴍᴀʟʟ Cᴀᴘs"
*/
public static SpannableString getSmallCapsString(String input) {