Skip to content

Instantly share code, notes, and snippets.

View andreadellacorte's full-sized avatar
🎯
Focusing

Andrea Della Corte andreadellacorte

🎯
Focusing
View GitHub Profile
@andreadellacorte
andreadellacorte / grep-lexical-illusions.sh
Last active February 27, 2016 19:58
Find lexical illusions - usage: cat file.txt | ./grep-lexical-illusions.sh
#!/bin/sh
# http://matt.might.net/articles/shell-scripts-for-passive-voice-weasel-words-duplicates/
exec egrep -i -n --color -Eo '(\b.+) \1\b' "$@"
@andreadellacorte
andreadellacorte / grep-passive-voice.sh
Created February 27, 2016 19:59
Find passive voice - usage: cat file.txt | ./grep-passive-voice.sh
#!/bin/sh
# http://matt.might.net/articles/shell-scripts-for-passive-voice-weasel-words-duplicates/
irregulars="awoken|\
been|born|beat|\
become|begun|bent|\
beset|bet|bid|\
bidden|bound|bitten|\
bled|blown|broken|\
bred|brought|broadcast|\
@andreadellacorte
andreadellacorte / grep-weasel-words.sh
Last active February 27, 2016 20:56
Find weasel words - usage: cat file.txt | ./grep-weasel-words.sh
#!/bin/sh
# http://matt.might.net/articles/shell-scripts-for-passive-voice-weasel-words-duplicates/
weasels="many|various|very|fairly|several|extremely\
|exceedingly|quite|remarkably|few|surprisingly\
|mostly|largely|huge|tiny|((are|is) a number)\
|excellent|interestingly|significantly\
|substantially|clearly|vast|relatively\
|completely|helps|supports|useful|improved\
|improves|effective|almost|lots\

Keybase proof

I hereby claim:

To claim this, I am signing this object:

#!/bin/zsh
echo "Start Export Process"
echo "Log into Keybase..."
keybase login
echo "Exporting your PGP keys..."
keybase pgp export -o keybase.public.key
keybase pgp export -s -o keybase.private.key
@andreadellacorte
andreadellacorte / backup.sh
Last active August 27, 2018 18:35
MacOS Backup
#!/bin/zsh
SHELL=/bin/zsh
ZSH=/Users/andrea/.oh-my-zsh
PATH=/usr/local/sbin:/Users/andrea/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/opt/puppetlabs/bin:/improbable/tools/latest/mac
upgrade_oh_my_zsh () {
env ZSH=$ZSH sh $ZSH/tools/upgrade.sh
}
@andreadellacorte
andreadellacorte / gist:8cf8c33d4497a5661c145a31f4338c61
Created October 14, 2018 13:58
Count frequency of words in a text
cat text.txt | tr '[:space:]' '[\n*]' | tr -cd "[:alnum:]\n"| tr "[:lower:]" "[:upper:]" | grep -v "^\s*$" | sort | uniq -c | sort -bnr > text.fqr
module.exports = {
projects: [
{
displayName: "test",
setupFiles: [
"<rootDir>/jest.setup.js"
],
testMatch: [
"<rootDir>/src/__tests__/*.spec.js"
]
@andreadellacorte
andreadellacorte / stryker.conf.js
Last active October 20, 2019 18:43
stryker.conf.js
module.exports = function(config) {
config.set({
mutator: "javascript",
packageManager: "npm",
reporters: ['progress', 'dots'],
testRunner: 'jest',
testFramework: 'jest',
coverageAnalysis: 'off',
fileLogLevel: 'trace',
jest: {
@andreadellacorte
andreadellacorte / dirdox2unix.sh
Created May 24, 2020 19:54
Convert a folder to unix; usage dirdox2unix <folder>
pushd $1
find . -type f -print0 | xargs -0 dos2unix
popd