Skip to content

Instantly share code, notes, and snippets.

View loraxx753's full-sized avatar

Kevin Baugh loraxx753

View GitHub Profile
@loraxx753
loraxx753 / curl.php
Created July 24, 2012 13:44
A curl class that makes CRUD-y curl calls easier
class Curl
{
/**
* A get request to another site.
*
* Ex: Curl::get('http://google.com/') will return the standard curl response from google
*
* @param string The url of the site
* @param string The response language (currently json or xml, they will be automatically parsed)
* @param array Any custom curl options that need to be added in the form of array(OPTION => 'value');
<?php
//Lets say the itema are stored in the $items variable
//$items[0]['Product Image'] is "product1.jpg" (that's what you would put in the database/the picture of the first item)
//Then you'd do
foreach($items as $item)
{ ?>
@loraxx753
loraxx753 / chris.php
Created October 17, 2012 20:49
PHP Practice 1
<?php
//Starting values (one way to do an array)
$peopleWhoHateChris = array('Jacob');
//Adding to the array
$peopleWhoHateChris[] = 'John';
$peopleWhoHateChris[] = 'Mike';
//Another way to add
<?php
$peopleWhoHateChris=array('Jacob','John','Mike','Luke');
$countHateChris=count($peopleWhoHateChris);
echo "$countHateChris people think Chris is a fucking retard.";
print $peopleWhoHateChris[2];
unset($peopleWhoHateChris[2]);
foreach($peopleWhoHateChris as $name){
'classes' = [
{
'learning_context' [int] - the learning context id of the Dredbeard page ,
'sis' [string] - the SIS canvas course id
'special_instructions' [string/optional] - any special instructions to add to the request,
}
]
@loraxx753
loraxx753 / classes.php
Created April 17, 2013 18:28
Intro to PHP classes
<?php
// This class defines what a dog is
class Dog {
// What runs when you make a "new Dog()"
function __construct($breed, $size) {
// Doing $this->whatever = $whatever assigns whatever's
// in the parenthesis to THAT particular dog
// that's being defined.
$this->breed = $breed;
<?php
function __autoload($class_name)
{
$fileName = '';
if(strpos($class_name, "\\") === false) {
$fileName = '/corename/app/classes' . DIRECTORY_SEPARATOR;
}
$className = ltrim($class_name, '\\');
<?php
namesapce Baughss\Core;
class Router {
}
@loraxx753
loraxx753 / index.html
Created October 26, 2017 19:11
QqRabZ
<link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet">
<p>Could you fucking not?</p>
@loraxx753
loraxx753 / test.js
Last active November 15, 2017 18:02
console.log(document.domain);
console.log('Attacked with XSS!');