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 September 20, 2024 07:10
Proposal: an ESX for JS implementation
@rishitells
rishitells / Jest_GitLab_CI.md
Last active August 27, 2024 07:42
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 July 4, 2024 18:49
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]"
@theodorosploumis
theodorosploumis / Nework_throttling_profiles.md
Last active August 16, 2024 02:39
Web development - Custom network throttling profiles
Profile download (kb/s) upload (kb/s) latency (ms)
Native 0 0 0
GPRS 50 20 500
56K Dial-up 50 30 120
Mobile EDGE 240 200 840
2G Regular 250 50 300
2G Good 450 150 150
3G Slow 780 330 200
@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');