Skip to content

Instantly share code, notes, and snippets.

View chriskonnertz's full-sized avatar
I need a time machine

Chris Konnertz chriskonnertz

I need a time machine
View GitHub Profile
@chriskonnertz
chriskonnertz / example_svg.svg
Created November 29, 2018 19:15
SVG Image Example File
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chriskonnertz
chriskonnertz / contentify_2_3.sql
Created March 23, 2018 17:25
Contentify CMS 2.3: MySQLDump (Username: test, Email: test@test.com, Password: test)
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Erstellungszeit: 23. Mrz 2018 um 18:24
-- Server-Version: 10.1.19-MariaDB
-- PHP-Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@chriskonnertz
chriskonnertz / snakeToCamel.js
Created February 21, 2018 18:40
JS snake to camel case converter
/**
* Converts a string in snake case to camel case and returns it.
* Example "this_is_cool" => "thisIsCool"
* ATTENTION: Expects the original string to be in valid snake case.
* Will not perform any validation - invalid input creates invalid output!
*/
snakeToCamel: function(snakeCased) {
// Use a regular expression to find the underscores + the next letter
return snakeCased.replace(/(_\w)/g, function (match) {
// Convert to upper case and ignore the first char (=the underscore)
@chriskonnertz
chriskonnertz / MatchesController.php
Created May 21, 2017 09:29
Add home team to matches page in file app/Modules/Matches/Http/Controlers/MatchesController.php
<?php namespace App\Modules\Matches\Http\Controllers;
use App\Modules\Matches\Match;
use URL, HTML, FrontController;
class MatchesController extends FrontController {
public function __construct()
{
$this->modelName = 'Match';
@chriskonnertz
chriskonnertz / logviewer.php
Created May 5, 2017 08:22
Symfony/Monolog log viewer
<?php
// Default values:
$logFile = __DIR__.'/path-to-folder/logs/dev.log';
$maxLines = 100;
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Symfony Log Viewer</title>
@chriskonnertz
chriskonnertz / contentify_2_0.sql
Created December 24, 2016 12:09
Contentify CMS 2.0: MySQLDump (Username: example, Email: example@example.com, Password: example)
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
-- --------------------------------------------------------
@chriskonnertz
chriskonnertz / contentify_1_2_0.sql
Last active June 6, 2016 10:58
Contentify CMS 1.2.0: MySQLDump (Username: example, Email: example@example.com, Password: example)
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
@chriskonnertz
chriskonnertz / contentify_2_0_dev.sql
Created April 16, 2016 13:05
Contentify CMS 2.0 dev: MySQLDump (Username: demo, Email: demo@contentify.org, Password: demodemo)
-- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Erstellungszeit: 16. Apr 2016 um 15:04
-- Server Version: 5.6.16
-- PHP-Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@chriskonnertz
chriskonnertz / index.blade.php
Created March 25, 2016 16:16
Modified Team Templates
<h1 class="page-title">{{ trans_object('teams') }}</h1>
@foreach ($teams as $team)
<article class="team">
<header>
<a href="{!! url('teams/'.$team->id.'/'.$team->slug) !!}">
<h2>{{ $team->title }}</h2>
@if ($team->image)
<div class="image">
$(document).ready(function()
{
var navKey = 'navIndex';
var navIndex= sessionStorage.getItem(navKey);
var $nav = $('#header nav');
if (typeof navIndex === 'undefined') {
navIndex = 0;
}