Skip to content

Instantly share code, notes, and snippets.

View shgysk8zer0's full-sized avatar
💭
I may be slow to respond.

Chris Zuber shgysk8zer0

💭
I may be slow to respond.
View GitHub Profile
@shgysk8zer0
shgysk8zer0 / test.html
Last active August 29, 2015 14:27
document.ready
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Document.Ready?</title>
<script>
HTMLDocument.prototype.ready = function () {
return new Promise(function(resolve, reject) {
if (document.readyState === 'complete') {
resolve(document);
@shgysk8zer0
shgysk8zer0 / weather.es6
Created August 26, 2015 07:58
OpenWeatherMap
/**
* Class for getting weather data using OpenWeatherMap
* @see http://openweathermap.org/current
*/
class OpenWeatherMap {
/**
* Creates new instance and sets class properties
*
* @param {string} imperial or metric
* @param {string} language code
@shgysk8zer0
shgysk8zer0 / array_loop.es6
Last active August 31, 2015 18:03
Array.loop using Generators
Array.prototype.loop = function* (times = Infinity) {
while (times-- > 0) {
for (let el of this) {
yield el;
}
}
};
@shgysk8zer0
shgysk8zer0 / miscellaneous.json
Created October 13, 2015 06:26
Miscellaneous Unicode chars as JSON
{
"BLACK_SUN_WITH_RAYS": {
"char": "\u2600",
"dec": 9728,
"hex": 2600,
"entity": ""
},
"CLOUD": {
"char": "\u2601",
"dec": 9729,
@shgysk8zer0
shgysk8zer0 / emoji.php
Created November 3, 2015 05:29
Sample
<?php
$timer = new \shgysk8zer0\Core\Timer();
$console = new \shgysk8zer0\Core\Console();
$header = new \shgysk8zer0\Core\Headers();
$html = new \shgysk8zer0\DOM\HTML();
$svg = new \shgysk8zer0\DOM\SVG();
$unicode = new \shgysk8zer0\Core\Unicode();
$chars = new \shgysk8zer0\Core\ArrayObject([
'BLACK_SUN_WITH_RAYS',
'WHITE_STAR',
@shgysk8zer0
shgysk8zer0 / .eslintignore
Last active May 7, 2018 15:09
Testing polyfill for URLSearchParams
.eslintrc
.eslintignore
.travis.yml
zq.js
README.md
polyfills.js
@shgysk8zer0
shgysk8zer0 / polyfills.es6
Created January 29, 2016 09:08
polyfill-module.es6
export {default as dePrefix} from './deprefixer.es6';
export * from './polyfills/array/modules.es6';
export * from './polyfills/string/modules.es6';
export * from './polyfills/element/modules.es6';
export * from './polyfills/css/modules.es6';
export * from './polyfills/promises.es6';
export * from './polyfills/fetch.es6';
export * from './polyfills/mutationobserver.es6';
@shgysk8zer0
shgysk8zer0 / .babelrc
Last active October 10, 2023 07:23
PHP URLSearchParams class
{
"presets": ["es2015"],
"sourceMaps": true,
"only": "*.js",
"compact": true,
"comments": false
}
@shgysk8zer0
shgysk8zer0 / namespacedfunction.php
Created February 29, 2016 05:01
NamespacedFunctions.php
<?php
/**
* @author Chris Zuber
* @copyright 2016, Chris Zuber
* @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, version 3 (GPL-3.0)
* This program 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 Foundation, either version 3
* of the License, or (at your option) any later version.
*
@shgysk8zer0
shgysk8zer0 / openpgp.txt
Created March 2, 2016 05:17
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:c8858e4f4633f3e5f364b25a539986bb2e23d409]