I hereby claim:
- I am cxdy on github.
- I am cxdy (https://keybase.io/cxdy) on keybase.
- I have a public key whose fingerprint is B4EC 2AE4 9B6A 82CC CC90 018C 8C03 06AE 682E 59A7
To claim this, I am signing this object:
<?php | |
function login($email, $password, $mysqli) { | |
// Prepared Statements make me happy :) | |
if ($stmt = $mysqli->prepare("SELECT id, username, password, salt | |
FROM members | |
WHERE email = ? | |
LIMIT 1")) { | |
$stmt->bind_param('s', $email); | |
$stmt->execute(); | |
$stmt->store_result(); |
<?php | |
$note_name = 'note.txt'; | |
$uniqueNotePerIP = true; | |
if($uniqueNotePerIP){ | |
$note_name = 'notes/'.md5($_SERVER['REMOTE_ADDR']).'.txt'; | |
} | |
if(isset($_SERVER['HTTP_X_REQUESTED_WITH'])){ |
// Load the http module to create an http server. | |
var http = require('http'); | |
// Configure our HTTP server to respond with Hello World to all requests. | |
var server = http.createServer(function (request, response) { | |
response.writeHead(200, {"Content-Type": "text/plain"}); | |
response.end("Hello World\n"); | |
}); | |
// Listen on port 8000, IP defaults to 127.0.0.1 |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
namespace SimpleCalculator |
<div class="lastfm"></div> | |
<script> | |
var scrobblinRefreshTimer = 10; | |
var scrobblinFileLocation = 'scrobblin.php'; | |
$(document).ready(function() { | |
refreshScrobblin(); | |
setInterval(function() { refreshScrobblin() }, scrobblinRefreshTimer * 1000); |
import requests, sys | |
# This program shows the simplicity | |
# of requests, Best library ever. | |
sqlcheck = ["SQL error:", "Warning:", "supplied argument", "PHP Warning:"] | |
if len(sys.argv) == 1: | |
print "usage: sqli.py http://hostname.com/" | |
exit(0) |
I hereby claim:
To claim this, I am signing this object:
<?php | |
/** | |
* Package: Scrobbl.in Core (http://github.com/cxdy/Scrobbl.in) | |
* Version: 2.0 | |
* Authors: Cody Kaczynski (http://github.com/cxdy) | |
* License: MIT License (http://opensource.org/licenses/MIT) | |
* You can obtain a Last.FM API key at http://www.last.fm/api/account/create | |
* Read the documentation (https://github.com/cxdy/Scrobbl.in/blob/master/README.md) | |
**/ |
// This was made to convert shutter speeds from node-exif from decimals of a second to fractions of a second. | |
// Example: 0.00125 converts to 1/800 | |
var input = "0.00125"; | |
function doMath(result, string) { | |
console.log(`${string} is ${result[0]}/${result[1]}th of a second`); | |
return result; | |
} |
var ExifImage = require('exif').ExifImage; | |
var image = 'DSC_8041.jpg'; | |
// Step 5, send data off | |
function finish(EXIF) { | |
console.log(`Finished EXIF: ` + JSON.stringify(EXIF)); | |
return EXIF; | |
} | |
// Step 4, reformat data |