Skip to content

Instantly share code, notes, and snippets.

View ameliaikeda's full-sized avatar
💜
probably drinking tea

Amelia Wylie ameliaikeda

💜
probably drinking tea
View GitHub Profile
<?php
Route::bind("user", function ($user) {
return User::findOrFail(["name" => $user]);
});
App::bind("User", "UserRepository");
Route::resource("/users/{user}", "UserController");
<?php
class Theme extends Eloquent {
protected $default = 1;
public static function theme($id) {
$theme = static::find($id);
# Index Settings
index:
analysis:
analyzer:
# set standard analyzer with no stop words as the default for both indexing and searching
default:
type: standard
stopwords: _none_
function GameAPI(locals) {
this.settings = $.extend(locals, {
base: "",
csrf: "",
laravel: true
});
this.method = "GET";
}

Request Spec

Hanyuu should:

  • Verify that incoming signatures from the headers X-Radio-Client and X-Radio-Auth match. (see below)
  • Use X-Forwarded-For on signature mismatch (or check remote addr). (this means that signatures are not needed for the current site)
  • return "hmac error" after we migrate websites on hmac failure

Signatures

<?php
use Buzz\Browser as Buzz;
use Buzz\Exception\ClientException as ClientException;
trait Requests {
// normally in REST this would be a GET. Instead, it's a POST so we can use CSRF tokens.
public function anyRequest($id) {
$song = DB::table("tracks")

Creating a theme

A folder and a file here will show you everything you need to add.

Theme folder: /app/views/default/ Theme CSS: /public/css/default.css

The theme name here is "default". Say you wanted to make a theme called "claud",

You'd make an empty folder called /app/views/claud/ and then add any files you wanted to overwite in there.

<?php
use GetId3\GetId3Core as ID3;
use Symfony\Component\HttpFoundation\File\UploadedFile;
trait Analysis {
// min, max
protected $bitrate = 128.0; // kbps
$(window).on("statechange", function(event) {
var state = History.getState();
var root = History.getRootUrl();
var uri = state.url.replace(root, "/");
var $next = $("[data-uri='" + uri + "']");
if ($next.length) {
// we've been to this page before.
mysql> select meta from postpending where accepted = 0 and reason like("%mash%");
+-------------------------------------------------------------------------------------------------------+
| meta |
+-------------------------------------------------------------------------------------------------------+
| PSY vs. Sengoku Nadeko - Gangnam Circulation |
| DJ Rgie Gatmaitan - Don't Say "Ladies" (Put a Tequ |
| DJ Rgie Gatmaitan - Don't Say "Ladies" (Put a Tequ |
| Kira Kira (Tea) Parties and Bullshit.mp3 |
| Hidamari Sketch ft. Wiz Khalifa - Black and Yellow Sketch |
| cat'syama - zutto with you friends (Skrillex vs ?????