Skip to content

Instantly share code, notes, and snippets.

csalmeida / bootstrap_partials.scss
Created July 28, 2020 18:15
Bootstrap SCSS Partials
// Required:
@import 'node_modules/bootstrap/scss/functions';
@import 'node_modules/bootstrap/scss/mixins';
@import "node_modules/bootstrap/scss/variables";
// Optional, comment out or remove leaving the only ones needed:
@import "node_modules/bootstrap/scss/root";
@import "node_modules/bootstrap/scss/reboot";
@import "node_modules/bootstrap/scss/type";
@import "node_modules/bootstrap/scss/images";
csalmeida / gulpfile.js
Last active September 30, 2020 17:39 — forked from dasilvaluis/gulpfile.js
Gettext Scanner Gulp 4 Script for Twig Projects
* Gettext Scanner Script for Twig Projects
* v1.3
* Developed by Luís Silva
* Purpose:
csalmeida / javascript_let_const_scope.js
Last active December 3, 2020 15:50
JavaScript Scope Examples
* How Javascript scope works using let and const
* It is more restrictive as to where values can be accessed within functions and blocks
// This variable can be accessed from anywhere.
const globalScopeVar = 'Can be accessed from anywhere (global scope)';
function parentScope() {
// This variable can only be accessed within this function and its child function and code blocks.
csalmeida / .dockerignore
Last active July 16, 2022 13:37
Rails Dockerfile
csalmeida /
Last active April 25, 2024 15:16
Using MutationObserver to listen to attribute changes

Mutation Observer Example

This is a working example of using the MutationObserver API to listen to changes in an DOM element's attributes.

Clicking the button triggers a change and in turn MutationObserver will notice the change. Logs available in the console.