Skip to content

Instantly share code, notes, and snippets.

View rodrigograca31's full-sized avatar
πŸ‘¨β€πŸ’»
Professional πŸ› solver

Rodrigo GraΓ§a rodrigograca31

πŸ‘¨β€πŸ’»
Professional πŸ› solver
View GitHub Profile
@rodrigograca31
rodrigograca31 / caeser_decrypt.js
Last active August 29, 2015 14:06
Javascript function to decrypt text encrypted by Caeser cipher.
function caeser(number, caeser){
for(i=0; i< caeser.length; i++){
if(caeser.charCodeAt(i)>=65 && caeser.charCodeAt(i)<=90){
if(caeser.charCodeAt(i)+number>90){
document.write(String.fromCharCode((caeser.charCodeAt(i)-90)+64+number));
}else{
document.write(String.fromCharCode(caeser.charCodeAt(i)+number));
}
} else {
document.write(String.fromCharCode(caeser.charCodeAt(i)));
<?
//From: http://php.net/manual/en/function.curl-exec.php
// create curl resource
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, "example.com");
@rodrigograca31
rodrigograca31 / FormattedDate.php
Last active August 29, 2015 14:03
Formatted date
date_default_timezone_set("Europe/Lisbon");
echo date("H:i:s, d/m/Y", time());
//use here: http://writecodeonline.com/php/