This file contains hidden or 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
#!/bin/bash | |
find . -maxdepth 2 -type f -iname '*.jpg' \ | |
-exec sh -c '(cd $(dirname {}) && gm mogrify -shave 100x100 -auto-orient -preserve-timestamp {})' ';' |
This file contains hidden or 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
#!/bin/bash | |
# Find all JPEG files and do stuff with https://github.com/google/guetzli | |
find . -maxdepth 4 -type f -iname '*.jpg' \ | |
-exec sh -c '(guetzli "{}" "{}.jpg")' ';' | |
This file contains hidden or 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
git clone https://git.ffmpeg.org/ffmpeg.git | |
cd ffmpeg | |
# Just enabling few important libraries, which are available in Ubuntu | |
# Also look at https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu | |
./configure \ | |
--prefix=/usr \ | |
--enable-gpl \ | |
--enable-version3 \ | |
--enable-nonfree \ |
This file contains hidden or 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
const fs = require('fs'); | |
const MATCH_SPRINT = /^## Sprint (\d+):[\S\s]+?demo<\/a>/ugm; | |
const HEADER_LEVEL = /^##/ugm; | |
const SUFFIX = /\.md$/; | |
const original = fs.readFileSync('sprints-2018.md', 'utf8'); | |
console.log(`Original file has ${original.length} lines`); |
This file contains hidden or 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
# Install tools | |
# https://github.com/jbarlow83/OCRmyPDF | |
# https://github.com/tesseract-ocr/tesseract | |
brew install tessdata tesseract-lang ocrmypdf | |
# Not all language data and other important files install initially in the same place | |
cp /usr/local/Cellar/tesseract/4.1.1/share/tessdata/* /usr/local/Cellar/tesseract-lang/4.0.0/share/tessdata/ | |
# Add to .bash_profile or run here before conversions | |
export TESSDATA_PREFIX=/usr/local/Cellar/tesseract-lang/4.0.0/share/tessdata/ |
This file contains hidden or 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
const fs = require('fs'); | |
// https://www.npmjs.com/package/playwright | |
const { | |
firefox | |
} = require('playwright'); | |
const FILE_DIR = __dirname + '/freds-scripts'; | |
// Fred's ImageMagick Scripts |
This file contains hidden or 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
# http://git-scm.com/docs/git-config.html | |
[user] | |
name = Juga Paazmaya | |
email = [email protected] | |
[github] | |
user = paazmaya | |
[ui] |
This file contains hidden or 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
// Copy these to the browser console. Using let instead of const to allow reassinging when its sometimes needed. | |
// Get a list of GitLab project URLs from a page | |
let list = document.querySelectorAll('.project-details h2 a'); | |
let urls = Array.from(list).map(item => item.getAttribute('href')); | |
// Remove the leading / from the URLs and combine with SSH git URL | |
let ssh_git_urls = urls.map(item => item.replace(/^\//, '')).map(item => `[email protected]:${item}.git`); | |
// Add clone command to the URLs |
OlderNewer