Skip to content

Instantly share code, notes, and snippets.

View chamberlainpi's full-sized avatar

Pierre Chamberlain chamberlainpi

View GitHub Profile
@chamberlainpi
chamberlainpi / github-approval-animated.css
Last active September 2, 2022 14:06
Github Approval + Emoji checkmark pulsing
/*
Slap this CSS in a Userstyle script tied to `https://github.com/` and enjoy!
This Chrome extension works well and is simple to use:
https://chrome.google.com/webstore/detail/user-javascript-and-css/nbhcbdghjpllgmfilhnhkllmkecfmpld
*/
.Link--muted[aria-label*=approval] {
font-weight: bold;
color: #008800 !important;
position: relative;
/**
@author Pierre Chamberlain
@description This is a demo of using the 'proxyFieldsOf(...)' method.
*/
const { proxyFieldsOf } = require('./proxy-fields-of');
const trace = console.log.bind(console);
const SOME_NAMESPACE = {
someObject: {
hi(name) {
@chamberlainpi
chamberlainpi / demo_image_carousel.html
Last active May 31, 2018 18:04
An Image-Carousel, for carouselling images, ya know.
@chamberlainpi
chamberlainpi / review_of_adamwathan_AVCD.md
Last active August 12, 2018 13:12
Pierre's review of Adam Wathan's "Advanced Vue Component Design"

Pierre's Review of
Adam Wathan's Advanced Vue Component Design

I've been using Vue for a little over a year now. It's my first "watchamacallit" framework (what's the name of these things anyways?) that I picked up, so I can't really form any comparison to AngularJS or React (other than they seem a bit more daunting to learn and use).

Anyhew, I'm hoping this review will help those who are hesitant to hit that "Buy 🛒" on Adam Wathan's video series!

Which can be found here btw...

@chamberlainpi
chamberlainpi / asynceach.js
Created July 12, 2017 20:23
NodeJS AsyncEach for handling async.series-like control-flow on Array of items.
const _ = require('lodash');
const trace = console.log.bind(console);
function AsyncEach(objList, funcList, cb) {
this.objList = objList;
this.funcList = _.isArray(funcList) ? funcList : [funcList];
this.cb = cb;
this._objID = -1;
this._obj = null;
this._funcID = -1;
@chamberlainpi
chamberlainpi / vuejs-deep-objects.html
Created February 8, 2017 06:11
A closer look at VueJS's reactivity with deep object updates and whole component swaps.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test HTML</title>
</head>
<body>
<div id="app">
<h1>Hello World!</h1>
@chamberlainpi
chamberlainpi / test.php
Created June 10, 2016 03:53
PHP proc_open random refresh issue
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CMS</title>
</head>
<body>
<a href='?node=npm&node_args=list'>Click to run "npm list"</a><br/>
@chamberlainpi
chamberlainpi / MacroMerge.hx
Last active September 12, 2015 20:37
A Merging tool for HTML files that requires all CSS / JS from external sources to be inlined in specific areas of a document.
package;
import haxe.io.Path;
import haxe.Json;
import sys.FileSystem;
import sys.io.File;
/**
* @author: Pierre Chamberlain
* @version: 1.0
*
@chamberlainpi
chamberlainpi / CopyFiles.hx
Last active August 29, 2015 14:18
Copy files in specific or common directory, useful for post-build processes.
package macros;
import sys.FileSystem;
import sys.io.File;
/**
* Can copy files in two ways:
* A) Provide only the first argument, where each elements specifies [sourceFile1, destFile1, sourceFile2, destFile2, ...], or;
* B) Provide a list of files to move (1st argument), and specify a common directory to copy them to;
*
* @usage:
@chamberlainpi
chamberlainpi / BuildCommands.hx
Last active August 29, 2015 14:18
Build several JS scripts in one pass.
package macros;
import haxe.io.Path;
import haxe.Json;
import sys.FileSystem;
import sys.io.File;
/**
* This script finds Haxe-files in a directory and compiles them to individual JS files.
* A JSON file must be supplied to indicate the CWD, outputDir, fileNamePattern to find the files,
* and the compiler-arguments to apply to all files.