Skip to content

Instantly share code, notes, and snippets.

View sholsinger's full-sized avatar

Steve Holsinger sholsinger

View GitHub Profile
@nicolasdao
nicolasdao / webpack.md
Last active July 28, 2023 19:15
Basic damn Webpack config for simple transpilation ES6 to ES5

Install

npm install -D acorn babel-loader @babel/core @babel/preset-env babel-polyfill webpack webpack-cli uglifyjs-webpack-plugin --save-dev

webpack-cli and acorn are dependencies that you, unfortunately, have to install if you want to run this god damn thing without any obscure warnings or errors.

Build

Configure Webpack

@CHH
CHH / MetaObject.php
Created August 30, 2011 13:55
PHP does Meta Programming too! (Requires PHP 5.4)
<?php
namespace CHH;
trait MetaObject
{
protected static $__metaClass;
static function setMetaClass(MetaClass $metaClass)
{
@dhrrgn
dhrrgn / .gitconfig
Last active September 25, 2015 14:38
An awesome .gitconfig file with some niceties.
[user]
name = Your Name
email = your@email.com
[core]
autocrlf = input
[color]
status = auto
diff = auto
branch = auto
[alias]
@tmilewski
tmilewski / gist:620644
Created October 11, 2010 15:00
$field_input_name always returns NULL. It doesn't get much simpler than this.
<?php
# Testing without inputs
function _xprofile_registration_display_field( $field_input_name = 'field_1' ) {
$fields = array(
'field_1' => true,
'field_10' => true,
'field_2' => true,
'field_4' => true,
'field_6' => false
);