Skip to content

Instantly share code, notes, and snippets.


luk exside

View GitHub Profile
View time.js
Date.prototype.customFormat = function(formatString) {
var YYYY,
View safari-reaper.html
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
body {
sarahdayan / modifiers.scss
Last active Aug 14, 2020
Sass Modifiers Mixin
View modifiers.scss
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
// Sass modifiers mixin by Sarah Dayan
// Generate All Your Utility Classes with Sass Maps:
remi /
Last active Jan 20, 2018
Bitcoin + Ethereum shell ticker to use with GeekTool on macOS
#!/usr/bin/env bash
# This script requires `curl`, `jq`, `xargs` `bc` and `awk`
add_arrows() {
foo=$(echo $1 | sed -e 's/^\([0-9]\)/▲ \1/g')
foo=$(echo $foo | sed -e 's/^-/▼ /g')
echo $foo
View es6-abstract-class-example.js
'use strict';
class Abstract {
// A static abstract method.
static foo() {
if (this === Abstract) {
// Error Type 2. Abstract methods can not be called directly.
throw new TypeError("Can not call static abstract method foo.");
} else if ( === {
// Error Type 3. The child has not implemented this method.
throw new TypeError("Please implement static abstract method foo.");
Restuta /
Last active Sep 5, 2020
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan  4 22:03 angular2.min.js
sottwell / Messages
Last active Feb 2, 2019
Dashboard Widget to display the number of internal Manager messages the user has - MODX Revoluition
View Messages
// Dashboard widget to show number of Manager messages
$id = $modx->user->get('id');
$output = 'No messages.';
$total = $modx->getCount('modUserMessage',array(
'recipient' => $id,
if($total) {
$output = 'You have ' . $total . ' messages';
$unread = $modx->getCount('modUserMessage',array(
'recipient' => $id,
nolanlawson /
Last active Aug 13, 2020
Safari IndexedDB/WebSQL bug wishlist

Safari IndexedDB/WebSQL bug wishlist

Big overview of what's missing in Safari 7.1+ and iOS 8+ in terms of browser storage.

Updated May 25th 2016

Safari (general)

View .cache.idx.php
* OpenExpedio ("xPDO") is an ultra-light, PHP 5.2+ compatible ORB (Object-
* Relational Bridge) library based around PDO (
* This plugin is part of xPDO.
* xPDO is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
christianseel / introRTE
Created Aug 14, 2014
RTE for introtext #modx
View introRTE
// Add RTE for introtext if richtext option is enabled for the resource
// check "OnDocFormRender" event
$modx->regClientStartupHTMLBlock('<script>Ext.onReady(function() {
if(MODx.loadRTE) MODx.loadRTE("modx-resource-introtext");
You can’t perform that action at this time.