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
<?php | |
/** | |
* @author Daniel Robenek | |
* @license MIT | |
* @since 2011 | |
*/ | |
namespace Debug; |
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
function new_registration($username, $email, $password, $confirmation_code) | |
{ | |
// Store the new user's information in the database. | |
$key = $this->config->item('encryption_key'); | |
$salt1 = hash('sha512', $key . $password); | |
$salt2 = hash('sha512', $password . $key); | |
$hashed_password = hash('sha512', $salt1 . $password . $salt2); |
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
for ($i = 1; $i <= 100; $i++) | |
{ | |
if($i % 3 == 0 && $i % 5 ==0){ | |
echo "FizzBuzz<br />"; | |
} | |
else if($i % 3 == 0){ | |
echo "Fizz<br />"; | |
} | |
else if($i % 5 == 0){ | |
echo "Buzz<br />"; |
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
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
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
sudo add-apt-repository ppa:webupd8team/sublime-text-2; | |
sudo apt-get update; | |
sudo apt-get install sublime-text-2 |
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
function drawVisualization() { | |
// Create and populate the data table. | |
var data = new google.visualization.DataTable(); | |
data.addColumn('string', 'Task'); | |
data.addColumn('number', 'Hours per Day'); | |
data.addRows(5); | |
data.setValue(0, 0, 'Work'); | |
data.setValue(0, 1, 11); | |
data.setValue(1, 0, 'Eat'); | |
data.setValue(1, 1, 2); |
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
https://tools.google.com/dlpage/drive |
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
https://accounts.google.com/b/0/IssuedAuthSubTokens |
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
user 'nobody' | |
password 'xampp' |
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
// Do whatever you'd like with the script! Show it off, mod it up, post it places, or whatever. :) | |
// (If you do, I wouldn't mind a Twitter shoutout at @_slinehan when appropriate!) | |
$imageURL = "URL HERE"; | |
$image = imagecreatefromjpeg($imageURL); | |
$width = imagesx($image); | |
$height = imagesy($image); | |
// First, let's resize the image to something manageable while maintaining aspect ratio. |
OlderNewer