Skip to content

Instantly share code, notes, and snippets.

View joshghent's full-sized avatar
🤡
🔫

Josh Ghent joshghent

🤡
🔫
View GitHub Profile
@joshghent
joshghent / main.php
Created February 12, 2019 21:45
AgedFirsthandKeyboard created by joshghent - https://repl.it/@joshghent/AgedFirsthandKeyboard
$string = "floccinaucinihilipilification";
$characters = array_unique(str_split($string));
$count = [];
foreach($characters as $char) {
$count[$char] = substr_count($string, $char);
}
// Order the array
@joshghent
joshghent / main.php
Created February 10, 2019 22:54
ElatedCuddlyMachinecode created by joshghent - https://repl.it/@joshghent/ElatedCuddlyMachinecode
class TestClass {
const aVariable = 'test';
}
echo TestClass::aVariable;
@joshghent
joshghent / Meetup Checklist.csv
Created December 22, 2018 12:00
Checklist for running a meetup
TYPE CONTENT PRIORITY INDENT AUTHOR RESPONSIBLE DATE DATE_LANG TIMEZONE
task Month Before: 1 1 Josh (17592616) Josh (17592616) en Europe/London
task Confirm speakers for date 4 2 Josh (17592616) Josh (17592616) every 3rd thursday en Europe/London
task Get speaker twitter handles 4 2 Josh (17592616) Josh (17592616) every 3rd thursday en Europe/London
task Invite speakers to LeicesterJS slack 4 2 Josh (17592616) Josh (17592616) every 3rd thursday en Europe/London
task Get talk titles from speakers 4 2 Josh (17592616) Josh (17592616) every 3rd thursday en Europe/London
@joshghent
joshghent / .htaccess
Created March 26, 2018 21:24
Cache Control Headers for Apache
# Cache Images for 1 Year
<filesMatch ".(jpg|jpeg|png|gif|ico)$">
Header set Cache-Control "max-age=31536000, public"
</filesMatch>
# But Cache JS and CSS for a month!
<filesMatch ".(css|js)$">
Header set Cache-Control "max-age=2628000, public"
</filesMatch>
// Place your settings in this file to overwrite the default settings
{
"editor.tabSize": 2,
"files.autoSave": "onFocusChange",
"php.validate.run": "onType",
"vsicons.dontShowNewVersionMessage": true,
"workbench.colorTheme": "Monokai",
"workbench.colorCustomizations": {
"activityBar.foreground": "#66d9efbf"
},
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('resources', '0004_editablemodel'),