This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2023 - Chris Kalmar | |
* | |
* CAUTION: This script will modify your files and folders. Make sure you have a backup! | |
* | |
* This script will rename all files and folders in a directory to kebab-case. | |
* It will also update all import paths in all files to reflect the renamed paths. | |
* For now only `import` statements are supported. | |
* | |
* Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log( | |
'%c Retro!', | |
'font-weight: bold; font-size: 70px; color: #F9DA4D; text-shadow: 5px 5px 0 #F2AA45, 10px 10px 0 #ED6255, 15px 15px 0 #EA3E81' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run: | |
# bash <(curl -fsSL <url-to-gist>) | |
apt-get update \ | |
&& apt-get upgrade -y | |
bash <(curl -fsSL https://get.docker.com ) | |
curl -L https://github.com/docker/compose/releases/download/1.28.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# delete alias: | |
# git config --global --unset alias.aliasName | |
git alias lol 'log --oneline --graph --decorate' | |
git alias pullbase '!f() { branchName=${1-master}; git checkout $branchName && git pull && git checkout - && git rebase $branchName; }; f' | |
git alias basepush '!f() { branchName=$(git name-rev --name-only HEAD); echo Merge "$branchName" and push origin; read && git checkout - && read && git merge $branchName && read && git push origin && read && git branch -d $branchName; }; f' | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# install doctl and hostess before use: | |
# https://github.com/digitalocean/doctl | |
# https://github.com/cbednarski/hostess | |
# | |
# brew install doctl | |
# brew install hostess | |
PREFIX=yourdomain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# clear old credentials | |
git credential-osxkeychain erase | |
host=github.com | |
protocol=https | |
<enter> | |
# view existing credentials | |
git credential-osxkeychain get | |
host=github.com | |
<enter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var keys = []; | |
var results = []; | |
var keyCount = 100; | |
var iterations = 10000; | |
//generate keys 0 to <keycount> | |
for (var i=0; i < keyCount; i++) { | |
keys.push(i); | |
results.push({ id: i }) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var keys = []; | |
var results = []; | |
var keyCount = 100; | |
var iterations = 10000; | |
//generate keys 0 to <keycount> | |
for (var i=0; i < keyCount; i++) { | |
keys.push(i); | |
results.push({ id: i }) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created at 03/17/2017 | |
* Developed by Jorge Cuesta <jorge.s.cuesta@gmail.com> | |
* Developed by Jeffrey Soriano <jeffreysoriano5@gmail.com> | |
*/ | |
// ### Use cases | |
/* | |
keys & data -> result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Anatoly Mironov (mirontoli) | |
* http://sharepointkunskap.wordpress.com | |
* http://www.bool.se | |
* | |
* http://stackoverflow.com/questions/3605495/generate-a-list-of-localized-language-names-with-links-to-google-translate/14800384#14800384 | |
* http://stackoverflow.com/questions/10997128/language-name-from-iso-639-1-code-in-javascript/14800499#14800499 | |
* | |
* using Phil Teare's answer on stackoverflow | |
* http://stackoverflow.com/questions/3217492/list-of-language-codes-in-yaml-or-json/4900304#4900304 |
NewerOlder