This file contains 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() { | |
// add loading image to div | |
$('#loading').html('loading...'); | |
// run ajax request | |
$.ajax({ | |
type: "GET", | |
dataType: "json", | |
url: "https://projects.chrisvogt.me/api/1.0/all.json", | |
success: function (data) { |
This file contains 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
-- ----------------------------------------------------- | |
-- FancySurvey Schema | |
-- 02/26/15 14:53:47 | |
-- Author: @c1v0 | |
-- ----------------------------------------------------- | |
-- ----------------------------------------------------- | |
-- Table `users` | |
-- ----------------------------------------------------- | |
CREATE TABLE IF NOT EXISTS `users` ( |
This file contains 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 for ($i = 0; $i < count($gamertags); $i++) : ?> | |
<?php if ($i == 0 || $i % 5 == 0) : ?> | |
<div class="row"> | |
<?php endif; ?> | |
<div class="medium-3 columns"> | |
<div class="panel"> | |
<div class="th" href="#"> | |
<img src="<?php echo $gamertags[$i]['Platform']['thumbnail']; ?>"> | |
</div> | |
<h5> |
This file contains 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 # /app/Model/AppModel.php | |
/** | |
* afterFind() override | |
* | |
* @param mixed $results | |
* @param boolean $primary | |
* @return mixed | |
*/ | |
public function afterFind($results, $primary = false) { |
This file contains 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 | |
public function afterFind($results, $primary = false) { | |
$html_fields = array('slider', 'social', 'body'); | |
foreach ($html_fields as $needle) { | |
foreach ($results as $key => $val) { | |
if (isset($val['Content'][$needle])) { | |
$results[$key]['Content'][$needle] = $this->_addBeautifyTag( | |
$results[$key]['Content'][$needle] ); | |
} | |
} |
This file contains 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 | |
// Include Simple HTML Dom Parser | |
require_once('simple_html_dom_parser.php'); | |
/** | |
* @author CJ Vogt <http://chrisvogt.me> | |
* @uses simple_html_dom | |
* @see http://simplehtmldom.sourceforge.net/manual.htm | |
*/ |
This file contains 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 | |
/** | |
* API Settings Class | |
* | |
* @property string $username | |
* @property string $password | |
* @property string $endpoint | |
* | |
* @author C1V0 <mail@chrisvogt.me> | |
*/ |
This file contains 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
CREATE TABLE `adsum`.`states` ( | |
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT , | |
`name` VARCHAR(50) NOT NULL , | |
`abbreviation` CHAR(2) NOT NULL , | |
PRIMARY KEY (`id`) ); | |
INSERT INTO `states` (`id`,`name`,`abbreviation`) VALUES ('1','Alabama','AL'); | |
INSERT INTO `states` (`id`,`name`,`abbreviation`) VALUES ('2','Alaska','AK'); | |
INSERT INTO `states` (`id`,`name`,`abbreviation`) VALUES ('3','Arizona','AZ'); | |
INSERT INTO `states` (`id`,`name`,`abbreviation`) VALUES ('4','Arkansas','AR'); |
This file contains 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 | |
/** | |
* Events Controller: assign() method | |
*/ | |
public function assign() { | |
if ($this->request->is('post')) { | |
if ($this->Event->saveAll($this->request->data)) { | |
$this->Session->setFlash(__('The attendee list has been updated.'), 'flash/success'); | |
$this->redirect(array('action' => 'index')); | |
} else { |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<link rel="shortcut icon" href="http://placehold.it/16x16&text=HI"> | |
<title>Yet Another Bootstrap Bootstrap</title> |