Skip to content

Instantly share code, notes, and snippets.

View zlocate's full-sized avatar

Denis zlocate

View GitHub Profile
#!/bin/bash
# Get node_modules dirs total size
# find . -name "node_modules" -type d -prune -print | xargs du -chs /
# Remove all node_modules dirs
find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \;
@zlocate
zlocate / .gitlab-ci.yml
Created August 16, 2023 11:20
Gitlab CI build, test, deploy NPM package (with global node modules cache)
# .gitlab-ci.yml
stages:
- build
- test
- deploy
# global cache settings for all jobs
# Ensure compatibility with the install job
@zlocate
zlocate / alibaba-vendor.md
Created June 15, 2023 12:20 — forked from emilio-martinez/alibaba-vendor.md
Topin 365GPS Server config

365GPS office address Contact: Erik Liu Address: 505 Block B, Donglian Building, Chuangye Second Road, Baoan District, Shenzhen, Guangdong, China(广东省深圳市宝安区创业二路东联大厦B座505,洪浪北地铁站旁) Mobile/ wechat/ whatsapp: +86-13480999031
Alibaba: 365gps.en.alibaba.com Skype: topin.sales
E-mail: [email protected]

============================================================= Hi

@zlocate
zlocate / 010editor_reset.sh
Created February 17, 2023 21:09
010Editor cleanup config and license info ;)
#!/bin/sh
rm ~/.local/share/SweetScape/010\ Editor/010Editor130.cfg
rm ~/.local/share/SweetScape/010\ Editor/010Editor.installed
rm ~/.config/SweetScape/010\ Editor.ini
@zlocate
zlocate / keepassxc-sync-passwords.path
Created July 10, 2022 11:30
KeePassXC database cloud sync (by rclone & systemd service)
[Path]
PathModified=YOUR_KEEPASSXC_LOCAL_DATABASE_PATH
Unit=keepassxc-sync-passwords.service
[Install]
WantedBy=multi-user.target
@zlocate
zlocate / download-snap.sh
Created May 8, 2022 20:32
Download .snap package file
#!/bin/bash
ARCH=amd64
RELEASE=stable
#export PATH="$PATH:/snap/bin/"
eval assert_fetcher_path="~/assert-fetcher/bin/assert-fetcher"
PACKAGE=$1
echo "Checking for jq..."
which jq
@zlocate
zlocate / create-fx-portable.sh
Last active September 14, 2023 04:08
Download and configure firefox as portable app
#!/bin/bash
#
# VERSION : 0.2
# AUTHOR : Davide Airaghi
#
# Script to create a portable version of Mozilla Firefox ESR
# to be used on a generic GNU/Linux System.
#
# if you run "bash build-firefox-portable.sh" you get a portable version for the latest version of Firefox "standard"
@zlocate
zlocate / google-no-redirect.js
Created December 28, 2021 20:53
Prohibit click-tracking, and prevent url redirection when clicks on the result links in Google search page
// Run this at browser console at google.com tab and reload page
Object.defineProperty(window, 'rwt', {
value:()=>true,
writable: false, // set the property to read-only
configurable: false
});
@zlocate
zlocate / deleteunused.js
Created July 13, 2021 16:38
Delete all unsed node deps
#!/bin/bash
file='unused-deps.txt'
echo "list all unused deps"
npx depcheck > $file
n=1
while read line; do
dep=$( echo "$line" | cut -c 3- )
echo "uninstall : $dep"
npm uninstall "$dep"
n=$((n+1))
#!/bin/bash
# Drops all MongoDB databases
mongo --quiet --eval 'db.getMongo().getDBNames().forEach(function(i){db.getSiblingDB(i).dropDatabase();})'