Skip to content

Instantly share code, notes, and snippets.

View rbinsztock's full-sized avatar
🏎️

Rémy Binsztock rbinsztock

🏎️
View GitHub Profile
// This injects a box into the page that moves with the mouse;
// Useful for debugging
async function installMouseHelper(page) {
await page.evaluateOnNewDocument(() => {
// Install mouse helper only for top-level frame.
if (window !== window.parent)
return;
window.addEventListener('DOMContentLoaded', () => {
const box = document.createElement('puppeteer-mouse-pointer');
const styleElement = document.createElement('style');
import { AutofillMonitor } from '@angular/cdk/text-field';
import { Directive, ElementRef, Optional, Self } from '@angular/core';
import {
AbstractControl,
DefaultValueAccessor,
RequiredValidator,
Validators,
} from '@angular/forms';
/**
const path = require('path');
const merge = require('webpack-merge');
const webpack = require('webpack');
const ProgressPlugin = require('webpack/lib/ProgressPlugin');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const {AngularCompilerPlugin} = require('@ngtools/webpack');
const {
PATHS,
PARAMS
@amimaro
amimaro / BulmaToggleModal
Last active October 11, 2022 13:06
Toggle Bulma Modal with Angular 5
Toggle Bulma Modal with Angular 5
@revolunet
revolunet / 0-raspi-cheatsheet-intro.md
Last active March 14, 2020 10:07
Raspberry PI 3 cheat sheet
@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active December 29, 2023 00:40
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@anthonyholmes
anthonyholmes / bootstrap-sass-mixin-cheatsheet.scss
Created October 10, 2014 08:13
Bootstrap Sass Mixin Cheatsheet
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);
@DTFagus
DTFagus / analyse_watchers.js
Created August 12, 2014 14:22
Bookmarklet to analyse angular watchers
javascript: (function() {
var root = $(document.getElementsByTagName('html'));
var watchers = [];
var attributes = [];
var attributes_with_values = [];
var elements = [];
var elements_per_attr = [];
var scopes = [];
@Arkham
Arkham / remote.md
Last active November 25, 2023 09:34
Remote, office not required

Remote, Office Not Required

The Time is Right for Remote Work

Why work doesn't happen at work

The office during the day has become the last place people want to be when then really want to get work done.

Offices have become interruption factories: it's just one interruption after

@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active November 29, 2023 15:35
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>