Skip to content

Instantly share code, notes, and snippets.

View Committing's full-sized avatar
😴
Snoozing.com

Jack Committing

😴
Snoozing.com
View GitHub Profile
@Committing
Committing / minimize.css
Last active July 7, 2019 11:20
Reddit minimise large
.res-nightmode .comment {
position: relative;
padding-left: 35px;
}
.res-nightmode a.expand {
display: block;
background-color: #333333;
position: absolute;
/*
* anime.js v3.0.1
* (c) 2019 Julian Garnier
* Released under the MIT license
* animejs.com
*/
'use strict';
// Defaults
<!DOCTYPE html>
<html>
<head>
<title>Richard's Form Results</title>
<link rel="stylesheet" href="format.css" />
</head>
<body>
<p>The caller's name <?php echo (isset($_GET['empname']) ? htmlentities($_GET['empname']) : '[Not Found]');?> </p>
<p>The caller's employee ID <?php echo (isset($_GET['empid']) ? htmlentities($_GET['empid']) : '[Not Found]');?></p>
<p>What is the problem with the item <?php echo (isset($_GET['problem']) ? htmlentities($_GET['problem']) : '[Not Found]');?></p>
<!DOCTYPE html>
<html>
<head>
<title>Richard's Form</title>
<link rel="stylesheet" href="format.css" />
</head>
<body>
<h1>Please enter some details of your issue below</h1>
@Committing
Committing / minify-error.js
Created August 17, 2017 08:32
JS File before minify
(function($){
var $et_window = $(window);
window.et_load_event_fired = false;
window.et_is_transparent_nav = $( 'body' ).hasClass( 'et_transparent_nav' );
window.et_is_vertical_nav = $( 'body' ).hasClass( 'et_vertical_nav' );
window.et_is_fixed_nav = $( 'body' ).hasClass( 'et_fixed_nav' );
jQuery.fn.reverse = [].reverse;
<?php
class Language {
public $language = '';
public $phrases = array(
'UK' => array(
'hello' => 'Ello gov\'na ',
'goodbye' => 'Good day!'
@Committing
Committing / output.js
Created October 10, 2016 16:31
Minify full output
(function(factory){"use strict";if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else{factory(jQuery)}})(function($){"use strict";var instances=[],matchers=[],defaultOptions={precision:86400000,elapse:!1,defer:!1};matchers.push(/^[.source);matchers.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source);matchers.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source);matchers=new RegExp(matchers.join("|"));function parseDateString(dateString){if(dateString instanceof Date){return dateString}
if(String(dateString).match(matchers)){if(String(dateString).match(/^[0-9]*$/)){dateString=Number(dateString)}
if(String(dateString).match(/\-/)){dateString=String(dateString).replace(/\-/g,"/")}
return new Date(dateString)}else{throw new Error("Couldnt cast `"+dateString+"` to a date object.")}}
var DIRECTIVE_KEY_MAP={Y:"years",m:"months",k:"monthsToYear",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHou
@Committing
Committing / example_js.js
Created October 10, 2016 16:28
Example JS that fails to Minify
/*!
* The Final Countdown for jQuery v2.2.0 (http://hilios.github.io/jQuery.countdown/)
* Copyright (c) 2016 Edson Hilios
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@Committing
Committing / encoding.sql
Created October 10, 2016 09:17
Updating encoding on table if multibyte encoding
alter table <some_table> convert to character set utf8 collate utf8_unicode_ci;
@Committing
Committing / petition.php
Last active June 25, 2016 19:08
Order parliament.uk votes by country
<?php
$res = file_get_contents('https://petition.parliament.uk/petitions/131215.json');
$select = json_decode($res);
$output = array();
$count = 0;