Skip to content

Instantly share code, notes, and snippets.

View adevtnofcodeDay3.cpp
#include <string>
#include <array>
#include <iostream>
void naive_solution(std::string &left, std::string &right)
for(int i = 0; i < right.length(); i++)
//to check if the given character in the right matches any character in the left
for(int j = 0; j < left.length(); j++)
mikepruett3 / shell-setup.ps1
Last active Feb 1, 2023
Packages to install via scoop, winget, choco, and other tools...
View shell-setup.ps1
Script to Initialize my custom powershell setup.
Script uses scoop
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
codigoconjuan / imagenes.js
Created Aug 4, 2021
Gist Soporte Imagenes WebP y Avif como Background
View imagenes.js
(function (document) {
var checkCount = 0,
formatFound = false;
function setHTMLClass(height, className) {
if (height == 2) {
formatFound = true;
document.documentElement.className += " " + className;
} else {
jimpea / lambdas.txt
Last active Feb 1, 2023
Some usefull Excel Lambda functions
View lambdas.txt
Append two ranges horizontally.
- range1: the first range
- range2: the second range
- default: the value entered into missing rows.
Return: The merged ranges, with empty rows filled with the default value. Missing
value within either of the two ranges filled with zeros (0). The number of rows
View Blobs.swift
// Blobs.swift
// SwiftUI Demos
// Created by Morten Just on 1/31/23.
import SwiftUI
struct Blobs: View {
View beamer-slides-with-notes.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
modernserf /
Last active Feb 1, 2023
Protocols/Interfaces in JavaScript with Symbols and bind syntax

Interfaces and protocols

ES2015, The newest iteration of JavaScript, introduces a ton of new features, types, and syntactic sugar. Those have all been explored pretty thoroughly, but the one that has the greatest implications for JavaScript are iterators; not the construct in itself but the use of the Iterator protocol.

Iterators are made possible by two new features: symbols and generators. Iterators are not necessarily a feature on their own, but rather a set of conventions around symbols and generators:

Given that JavaScript does not have interfaces, Iterable is more of a convention:

Source: A value is considered iterable if it has a method whose key is the symbol Symbol.iterator that returns a so-called iterator. The iterator is an object that returns values via its method next(). We say: it enumerates items, one per method call.

diafour /
Last active Feb 1, 2023
Run kind cluster with access to local registry
#!/usr/bin/env bash
# A helper for kind to create and delete clusters with untrusted local registry.
# Based on
# Note: kind 0.10.0
# Settings for kind cluster
View omni-retro-metro
["#ea5545", "#f46a9b", "#ef9b20", "#edbf33", "#ede15b", "#bdcf32", "#87bc45", "#27aeef", "#b33dc6"]
zshell31 / react-native-pinch-zoom.js
Created Sep 19, 2016
React Native: how to implement pinch to zoom gesture
View react-native-pinch-zoom.js
/** Links:
* -
* -
import React, {Component, PropTypes} from 'react';
import { Text, View, PanResponder, Image } from 'react-native';
function calcDistance(x1, y1, x2, y2) {