Skip to content

Instantly share code, notes, and snippets.

View eyecatchup's full-sized avatar

Stephan Schmitz eyecatchup

View GitHub Profile
@eyecatchup
eyecatchup / 0_readme.md
Last active February 25, 2016 14:36
Leaked CTB-Locker/Critroni PHP source code. Full package now available here: https://github.com/eyecatchup/Critroni-php
@eyecatchup
eyecatchup / so-exception.php
Last active February 23, 2016 11:56
The only PHP exception handler you will ever need. ;-)
<?php
try {
// something
} catch (\Exception $e) {
header('Location: https://www.stackoverflow.com/search?q=[php]%20' . $e->getMessage());
}
@eyecatchup
eyecatchup / namespaceRefactor.php
Created February 18, 2016 13:21 — forked from hpbuniat/namespaceRefactor.php
Super-simple script to convert a existing project to use namespaces
<?php
/**
* Super-simple script to convert a existing project to use namespaces
*
* @author Hans-Peter Buniat <[email protected]>
* @copyright 2012 Hans-Peter Buniat <[email protected]>
* @license http://opensource.org/licenses/BSD-3-Clause
*/
class namespaceRefactor {

After minification, this SCSS:

.class-a {
    font: 500 18px "TeleGrotesk", Arial, Helvetica, sans-serif;
}
.class-b {
    font: 500 18px TeleGrotesk, Arial, Helvetica, sans-serif;
}
@eyecatchup
eyecatchup / logger.js
Created February 16, 2016 11:50 — forked from jareware/logger.js
Simple utility for unified logging to the console, with optional timestamping.
/**
* Simple utility for unified logging to the console, with optional timestamping.
*
* @example // Create several loggers around the application:
* var log = logger.create('main');
* var logInAnotherModule = logger.create('anotherModule');
*
* // Call the created loggers:
* log('Application started');
* logInAnotherModule('Module started');
@eyecatchup
eyecatchup / SCSS.md
Created February 15, 2016 20:19 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@eyecatchup
eyecatchup / test.md
Last active February 14, 2016 04:32
@eyecatchup
eyecatchup / gist-toc.js
Last active March 7, 2019 21:57 — forked from ukyo/gist-toc.js
toc tree for gist
(function(l, l2, s) {
l2 = l2 || 6;
NodeList.prototype.forEach = [].forEach;
NodeList.prototype.slice = [].slice;
var toc = document.createElement('div');
var headerLevel = l || 2;
var tocStyle = s || 'ul';
@eyecatchup
eyecatchup / fs.js
Created February 13, 2016 06:00 — forked from ukyo/fs.js
tiny requestFileSytem Wrapper
//tiny requestFileSystem Wrapper
//author @ukyo
//apache license
//refer: http://d.hatena.ne.jp/shirokurostone/20111014/1318593601
var fs = (function(window){
var fs = {},
BlobBuilder = window.WebKitBlobBuilder || window.MozBlobuilder || window.MSBlobBuilder,
requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem,