Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sp90's full-sized avatar
🦜
Focusing

Simon sp90

🦜
Focusing
View GitHub Profile
@LayZeeDK
LayZeeDK / angular-cli-node-js-typescript-rxjs-compatiblity-matrix.csv
Last active March 17, 2024 13:40
Angular CLI, Angular, Node.js, TypeScript, and RxJS version compatibility matrix. Officially part of the Angular documentation as of 2023-04-19 https://angular.io/guide/versions
Angular CLI version Angular version Node.js version TypeScript version RxJS version
~16.0.0 ~16.0.0 ^16.13.0 || ^18.10.0 >=4.9.5 <5.1.0 ^6.5.5 || ^7.4.0
~15.2.0 ~15.2.0 ^14.20.0 || ^16.13.0 || ^18.10.0 >=4.8.4 <5.0.0 ^6.5.5 || ^7.4.0
~15.1.0 ~15.1.0 ^14.20.0 || ^16.13.0 || ^18.10.0 >=4.8.4 <5.0.0 ^6.5.5 || ^7.4.0
~15.0.5 ~15.0.4 ^14.20.0 || ^16.13.0 || ^18.10.0 ~4.8.4 ^6.5.5 || ^7.4.0
~14.3.0 ~14.3.0 ^14.15.0 || ^16.10.0 >=4.6.4 <4.9.0 ^6.5.5 || ^7.4.0
~14.2.0 ~14.2.0 ^14.15.0 || ^16.10.0 >=4.6.4 <4.9.0 ^6.5.5 || ^7.4.0
~14.1.3 ~14.1.3 ^14.15.0 || ^16.10.0 >=4.6.4 <4.8.0 ^6.5.5 || ^7.4.0
~14.0.7 ~14.0.7 ^14.15.0 || ^16.10.0 >=4.6.4 <4.8.0 ^6.5.5 || ^7.4.0
~13.3.0 ~13.3.0 ^12.20.2 || ^14.15.0 || ^16.10.0 >=4.4.4 <4.7.0 ^6.5.5 || ^7.4.0
@zthomas
zthomas / intercom-delete-old-users.js
Last active May 1, 2023 15:28
Script to delete and clear old users from intercom. Useful for lowering the monthly bill
// License: MIT, feel free to use it!
const Intercom = require('intercom-client');
const appId = 'APP_ID'
const apiKey = 'APP_KEY'
const client = new Intercom.Client(appId, apiKey);
const async = require('async-q')
//REF: https://developers.intercom.com/reference#iterating-over-all-users
//WARNING: you can only have one scroll working at once. you need to wait for that scroll to clear to try again
@darisi
darisi / Gruntfile.js
Last active September 14, 2019 20:14
Uncss setting with grunt examples
uncss: {
dist: {
options: {
ignore: [
/(#|\.)fancybox(\-[a-zA-Z]+)?/,
/expanded/,
/js/,
/wp-/,
/align/,
/admin-bar/,
@Yimiprod
Yimiprod / difference.js
Last active April 5, 2024 13:17
Deep diff between two object, using lodash
/**
* This code is licensed under the terms of the MIT license
*
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
@edouard-lopez
edouard-lopez / libsass-install.bash
Last active October 17, 2019 17:17
Installing/Compiling libsass and sassc on Ubuntu 14.04+/Linux Mint 17+ (needed by node-sass)
# Based on https://github.com/sass/libsass/wiki/Building-with-autotools
# Install dependencies
apt-get install automake libtool
# Fetch sources
git clone https://github.com/sass/libsass.git
git clone https://github.com/sass/sassc.git libsass/sassc
# Create configure script
@kwokhou
kwokhou / angular-autoNumeric.js
Last active April 22, 2024 21:54
AngularJS directive for autoNumeric.js
// Directive for autoNumeric.js
// Require AngularJS, jQuery and autoNumeric.js
angular.module('crunch.ui.numeric', []).directive('crNumeric', [function () {
'use strict';
// Declare a empty options object
var options = {};
return {
// Require ng-model in the element attribute for watching changes.
require: '?ngModel',
// This directive only works when used in element's attribute (e.g: cr-numeric)
@acusti
acusti / dropdown-touch.js
Last active July 11, 2017 18:00
Plain vanilla JS with no dependencies to add touch device support for drop down menus (nested unordered list style). CSS selectors to display nested `<ul>` should look like: `body.no-touch ul.menu > li:hover > ul, ul.menu > li.tapped > ul { display: block; }`
(function(doc) {
// Add touch device support for dropdown menu
if (('addEventListener' in doc) && ('querySelectorAll' in doc) && (('ontouchstart' in window) || ('onmsgesturechange' in window))) {
var menu_item_selector = '.the-menu > div > ul > li',
menu_items = doc.querySelectorAll(menu_item_selector),
touchStart;
// Set up touch start handler
touchStart = function() {
if (this.className.indexOf(' tapped') > -1) {