Skip to content

Instantly share code, notes, and snippets.

View kcmr's full-sized avatar

Kus Cámara kcmr

View GitHub Profile
@matthew-d-white
matthew-d-white / generativeaiglossary.txt
Last active February 4, 2024 14:08
Generative AI Glossary
+----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Term | Definition |
+----------------------------------------------------+------------------------------
@WebReflection
WebReflection / esx.md
Last active May 26, 2024 02:33
Proposal: an ESX for JS implementation
@rishitells
rishitells / Jest_GitLab_CI.md
Last active May 31, 2024 07:51
Setting up Jest tests and coverage in GitLab CI

Configuring Jest Tests in GitLab CI

1. Add GitLab CI configuration file in the root

In the root of your project, add .gitlab-ci.yml with the configuration below.

image: node:latest

stages:
@ccnokes
ccnokes / heic_to_jpeg.sh
Last active November 21, 2022 16:06
Bash script that converts .HEIC to .jpg files
#!/bin/bash
set -eu -o pipefail
count=$(find . -depth 1 -name "*.HEIC" | wc -l | sed 's/[[:space:]]*//')
echo "converting $count files .HEIC files to .jpg"
magick mogrify -monitor -format jpg *.HEIC
echo "Remove .HEIC files? [y/n]"
@kcmr
kcmr / rename-element-to-polymerelement.js
Last active December 28, 2019 23:07
Codemod to replace the first block scope in a file by a IIFE
export default function(file, api) {
const j = api.jscodeshift;
return j(file.source)
.find(j.VariableDeclarator, {
id: {
type: 'Identifier',
name: 'Element',
},
})
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).

@rockchalkwushock
rockchalkwushock / config.yml
Created October 4, 2017 16:52
Full config.yml from Medium Article
version: 2
jobs:
checkout_code:
docker:
- image: circleci/node:latest
working_directory: ~/circleci-deployment
steps:
- checkout
- attach_workspace:
at: ~/circleci-deployment
@kcmr
kcmr / gulpfile.js
Last active July 17, 2017 22:26
PSK 2 Custom Build with livereload and autoprefixer for elements
'use strict';
const requireDir = require('require-dir');
const tasks = requireDir('./tasks');
@praveenpuglia
praveenpuglia / shadow-dom.md
Last active March 28, 2024 15:06
Everything you need to know about Shadow DOM

I am moving this gist to a github repo so more people can contribute to it. Also, it makes it easier for me to version control.

Please go to - https://github.com/praveenpuglia/shadow-dom-in-depth for latest version of this document. Also, if you find the document useful, please shower your love, go ⭐️ it. :)

Shadow DOM

Heads Up! It's all about the V1 Spec.

In a nutshell, Shadow DOM enables local scoping for HTML & CSS.