Skip to content

Instantly share code, notes, and snippets.

View wandroll's full-sized avatar
🙃

Wandrille Verlut wandroll

🙃
View GitHub Profile
var funcSerialized = (name) => `function ${name}() { [native code] }`;
var nativeObjects = [Array, Boolean, Date, Function, JSON, Object, Promise, RegExp];
var ignoreList = ['length', 'constructor', '__proto__', 'caller', 'callee', 'arguments', 'source', 'toGMTString'];
var test = (nativeObject) => {
const proto = nativeObject.prototype || nativeObject;
Object.getOwnPropertyNames(proto)
.filter(name => !ignoreList.includes(name))
.filter(name => proto[name])
.map(name => ({
name,
@timurcatakli
timurcatakli / webpack.config.js
Last active May 1, 2023 18:25
An Easy to Understand Webpack 4+ Configuration File with Comments
const publicPath = 'public';
// Node os module
// The os module provides a number of operating system-related utility methods.
// It can be accessed using:
const os = require('os');
// Using a single monolithic configuration file impacts comprehension and
// removes any potential for reusability.
// As the needs of your project grow, you have to figure out the means to manage
// webpack configuration more effectively.
@jmhobbs
jmhobbs / README.md
Last active March 24, 2023 15:19
Create scrolling text gifs for Slack

Makes little scrolly text jiffs in Flywheel colors.

Prerequisites

  • imagemagick brew install imagemagick
  • gifsicle brew install gifsicle
  • Heartwell 1.2.otf font installed
  • u r on a mac

Usage

@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
@hertsch
hertsch / kitframework_list_routing_patterns.php
Last active April 26, 2017 08:28
Silex: get a list of all routing URI patterns
// get all routing objects
$patterns = $app['routes']->getIterator(); // seems to be changed in Silex 1.1.0 !!! ... ->current()->all();
// walk through the routing objects
foreach ($patterns as $pattern) {
$match = $pattern->getPattern();
echo "$match<br />";
}