Skip to content

Instantly share code, notes, and snippets.

View smitroshin's full-sized avatar

Serghei Mitroșin smitroshin

  • Amdaris
  • Chisinau, Moldova
View GitHub Profile
@maximkott
maximkott / mask.js
Last active April 15, 2024 20:43
mask a string in javascript
export const maskString = (
value: any,
mask: string,
maskPatterns: Record<string, RegExp | ((char: string) => boolean)>
) => {
value = value || '';
mask = mask || '';
maskPatterns = maskPatterns || {};
let maskedValue = '';
@mhulse
mhulse / javascript-plugin-patterns-FOUND-protoytpe-newed.js
Last active May 16, 2021 14:45
Some of my favorite JavaScript plugin design patterns: The Facade Pattern, The Revealing Module Pattern, Immediately-invoked Function Expressions (IIFE)s, The Module Pattern imports and exports
// http://callmenick.com/post/slide-and-push-menus-with-css3-transitions
(function(window) {
'use strict';
/**
* Extend Object helper function.
*/
function extend(a, b) {
@ffffranklin
ffffranklin / name-that-color.js
Created February 19, 2016 23:45
Name That Color - Created by Chirag Mehta
/*
+-----------------------------------------------------------------+
| Created by Chirag Mehta - http://chir.ag/projects/ntc |
|-----------------------------------------------------------------|
| ntc js (Name that Color JavaScript) |
+-----------------------------------------------------------------+
All the functions, code, lists etc. have been written specifically
for the Name that Color JavaScript by Chirag Mehta unless otherwise
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"