Skip to content

Instantly share code, notes, and snippets.

View kirillgroshkov's full-sized avatar
💭
(кродеться)

Kirill Groshkov kirillgroshkov

💭
(кродеться)
View GitHub Profile
diff --git a/node_modules/jest-runtime/build/index.js b/node_modules/jest-runtime/build/index.js
index 0c9dd8c..58109b5 100644
--- a/node_modules/jest-runtime/build/index.js
+++ b/node_modules/jest-runtime/build/index.js
@@ -1189,7 +1189,38 @@ class Runtime {
return this._getMockedNativeModule();
}
- return require(moduleName);
+ // return require(moduleName);
@kirillgroshkov
kirillgroshkov / angular.txt
Created August 12, 2019 07:39
upgrade loadChildren angular 7>8
# Regex:
loadChildren:\s*'(.*)#(.*)'
loadChildren: () => import('$1').then(m => m.$2)
@kirillgroshkov
kirillgroshkov / ffmpeg.sh
Created June 30, 2019 13:07
ffmpeg cheat sheet
# Split movie into chunks
ffmpeg -i input.mkv -c copy -map 0 -segment_time 01:00:00 -reset_timestamps 1 -f segment output%03d.mkv
@kirillgroshkov
kirillgroshkov / linux_commands.sh
Last active November 16, 2020 11:48
Various linux commands
# Directory size
du -sh ./node_modules
# In KB
du -sk ./node_modules
# Sorted size of node_modules
du -sh ./node_modules/* | sort -nr | grep '\dM.*'
while true; do ps eo time,rss,%mem,%cpu,pid <pid> | grep -v TIME >> memory.log; echo -n .; sleep 5; done
@kirillgroshkov
kirillgroshkov / youtube_download.sh
Last active January 11, 2019 20:18
youtube download
# ytdl is `npm i -g ytdl`
# Download video
ytdl "http://www.youtube.com/watch?v=ZY1OkgEV-ZA" > video1.mp4
# Extract just audio from mp4
# cat ./video1.mp4 | ffmpeg -i pipe:0 -b:a 192K -vn audio1.aac
cat ./video1.mp4 | ffmpeg -i pipe:0 -vn audio1.aac
@kirillgroshkov
kirillgroshkov / center_object.js
Created September 15, 2018 21:31
photoshop scripts
var scale = 100;
var idoc = app.activeDocument;
var sel = idoc.selection;
var pgItem = sel[0].duplicate();
pgItem.resize (scale, scale, AnchorPosition.MIDDLECENTER);
#pgItem.resize (scale, scale, true, true, true, true, scale, Transformation.CENTER)
#pgItem.move(ilayer, ElementPlacement.PLACEATEND);
# Delete everything
docker system prune -a
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@kirillgroshkov
kirillgroshkov / macosfix
Last active April 6, 2018 07:21
Fix MacOS maxproc/maxfiles issue
sudo launchctl limit maxproc 2000 2500
sudo launchctl limit maxfiles 2000 unlimited
@kirillgroshkov
kirillgroshkov / gitconfigs.sh
Last active November 29, 2017 20:33
working with git config
# List
git config -l -f .gitmodules
# Set value
git config -f .gitmodules submodule.NCShared.branch abc