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
# List | |
git config -l -f .gitmodules | |
# Set value | |
git config -f .gitmodules submodule.NCShared.branch abc |
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
sudo launchctl limit maxproc 2000 2500 | |
sudo launchctl limit maxfiles 2000 unlimited |
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 everything | |
docker system prune -a | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
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 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); |
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
# 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 |
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
while true; do ps eo time,rss,%mem,%cpu,pid <pid> | grep -v TIME >> memory.log; echo -n .; sleep 5; done |
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
# 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.*' |
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
# 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 |
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
# Regex: | |
loadChildren:\s*'(.*)#(.*)' | |
loadChildren: () => import('$1').then(m => m.$2) |
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
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); |