Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
(кродеться)

Kirill Groshkov kirillgroshkov

💭
(кродеться)
View GitHub Profile
View jest-runtime+25.4.0.patch
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 Aug 12, 2019
upgrade loadChildren angular 7>8
View angular.txt
# Regex:
loadChildren:\s*'(.*)#(.*)'
loadChildren: () => import('$1').then(m => m.$2)
@kirillgroshkov
kirillgroshkov / ffmpeg.sh
Created Jun 30, 2019
ffmpeg cheat sheet
View ffmpeg.sh
# 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
View linux_commands.sh
# Directory size
di -sh ./node_modules
# In KB
du -sk ./node_modules
View print_mem_usage.sh
while true; do ps eo time,rss,%mem,%cpu,pid <pid> | grep -v TIME >> memory.log; echo -n .; sleep 5; done
View youtube_download.sh
# 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
View center_object.js
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);
View docker_commands.sh
# 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 Apr 6, 2018
Fix MacOS maxproc/maxfiles issue
View macosfix
sudo launchctl limit maxproc 2000 2500
sudo launchctl limit maxfiles 2000 unlimited
@kirillgroshkov
kirillgroshkov / gitconfigs.sh
Last active Nov 29, 2017
working with git config
View gitconfigs.sh
# List
git config -l -f .gitmodules
# Set value
git config -f .gitmodules submodule.NCShared.branch abc
You can’t perform that action at this time.