Skip to content

Instantly share code, notes, and snippets.

View shapkarin's full-sized avatar
🗯️
make a difference

Uri Kiro shapkarin

🗯️
make a difference
View GitHub Profile
@lhorie
lhorie / longest-keyword-sequence.md
Last active November 13, 2024 04:15
What's the longest keyword sequence in Javascript?
# 100% useful
## option one package
```sh
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +
```
## option 2: in some cases may be danger with `--target` option to remove ./dist ./build ./.next
```sh
npx npkill -D -X /target/folder
@jebeck
jebeck / infinite.js
Last active July 15, 2022 01:10
infinite interactivity with Inquirer and RxJS's Subject
// run with `node infinite.js` in node v4.x+
// must have Inquirer installed (`npm install inquirer`)
const inquirer = require('inquirer');
const Rx = require('rx');
const prompts = new Rx.Subject();
function makePrompt(msg) {
return {
@shapkarin
shapkarin / curiosity.js
Last active May 25, 2025 09:04
curiosity
/*
. .-.
| `-.
`-' `-'
*/
[] + {}
// "[object Object]"
{} + []
// 0
@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active November 30, 2025 00:48
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName