Skip to content

Instantly share code, notes, and snippets.

View Cleanse's full-sized avatar
🕊️
THINKING

Paul Lovato Cleanse

🕊️
THINKING
View GitHub Profile
CREATE TABLE `schedule` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`scheduled_on` datetime DEFAULT NULL,
`desc` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
Route::get('test', function() {
//Get database data as objects
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<!-- Bootstrap http://www.building58.com/examples/tabSlideOut.html-->
<link href="css/bootstrap.min.css" rel="stylesheet">
$entry = Entry::with(['user' => function($query) use ($user, $team) {
$query->where('id', '=', $user)->with(['team' => function($q) use ($team) {
$q->where('id', '=', $team);
}]);
}])->get();
Database:
entries
- id
- user_id
- team_id
users
- id
- name
function verticalFunction() {
return 'This';
}
function horizontalFunction() {
return 'That';
}
@Cleanse
Cleanse / azura.js
Created September 24, 2015 22:55
Test for Azura
var Discord = require("discord.js");
var mybot = new Discord.Client();
mybot.on("message", function(message){
if(message.content === "ping")
mybot.reply(message, "pong");
});
@Cleanse
Cleanse / Week6.json
Created October 15, 2015 15:01
Week6 Picks
{
"Atlanta(6)-vs-New_Orleans(28)": "Atlanta (Spread: NO +3.5)",
"Washington(17)-vs-NY_Jets(7)": "NY Jets (Spread: NYJ -5.5)",
"Arizona(4)-vs-Pittsburgh(12)": "Arizona (Spread: PIT -3.5)",
"Kansas_City(25)-vs-Minnesota(9)": "Minnesota (Spread: MIN -3.5)",
"Cincinnati(3)-vs-Buffalo(13)": "Cincinnati (Spread: BUF +2.5)",
"Chicago(20)-vs-Detroit(31)": "Chicago (Spread: DET -3.5)",
"Denver(5)-vs-Cleveland(18)": "Denver (Spread: CLE +4.5)",
"Houston(30)-vs-Jacksonville(32)": "Houston (Spread: JAC +1.5)",
"Miami(24)-vs-Tennessee(29)": "Tennessee (Spread: TEN -2.5)",
@Cleanse
Cleanse / role-colour.js
Last active February 22, 2016 03:07
role color change
bot.on('message', function(message)
{
if (message.content.indexOf("!color") === 0) {
//check if the message length is satisfactory
if (message.content.split(" ").length === 3) {
var colorDecimal = message.content.split(" ")[2];
if (message.channel.server.roles.get("name", message.content.split(" ")[1])) {
var role = message.channel.server.roles.get("name", message.content.split(" ")[1]);
title = "Article Post"
url = "/article/:slug"
layout = "basic"
description = "Viewing a single article post."
is_hidden = 0
[blogPost]
slug = "{{ :slug }}"
categoryPage = "article/category"
<?php namespace Cleanse\Urls\Classes;
use ApplicationException;
class ShortIds
{
public $radix;
public $words;
public function __construct()