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
** Using a shell function in your .bashrc (recommended approach): | |
```bash | |
findgrep() { | |
find . -type f -exec grep -l "$1" {} \; | |
} | |
``` | |
*** Or even simpler, you can use grep -r directly (more efficient): | |
```bash |
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
./configure \--with-features=huge \ | |
--enable-multibyte \ | |
--enable-rubyinterp=dynamic \ | |
--enable-pythoninterp=dynamic \ | |
--with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/ \ | |
--with-python-command=/usr/bin/python \ | |
--enable-python3interp=dynamic \ | |
--with-python-config-dir=/usr/lib/python3.9/config-3.9-x86_64-linux-gnu/ \ | |
--with-python3-command=/usr/bin/python3 \ | |
--enable-perlinterp=dynamic \ |
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
lazynvm() { | |
unset -f nvm node npm | |
export NVM_DIR=~/.nvm | |
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
} | |
nvm() { | |
lazynvm | |
nvm $@ | |
} |
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
$ mkdir repo_cleanup | |
$ cd repo_cleanup | |
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY . | |
$ git filter-branch --force --index-filter \ | |
"git rm --cached --ignore-unmatch key.txt" \ | |
--prune-empty --tag-name-filter cat -- --all | |
$ echo "key.txt" >> .gitignore | |
$ git add .gitignore | |
$ git commit -m "Add key.txt to .gitignore" | |
$ git push origin --force --all |
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/sh | |
USER=my-user | |
HOST=my-server.com | |
DIR=my/directory/to/topologix.fr/ # the directory where your web site files should go | |
hugo && rsync -avz --delete public/ ${USER}@${HOST}:~/${DIR} # this will delete everything on the server that's not in the local public folder | |
exit 0 |
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
sudo python3 -m pip install --upgrade requests |
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
""" | |
@Will Reynolds 2018 | |
this is a financial data gathering and manipulation program. | |
""" | |
# import libraries | |
# you must have the following packages installed to run the program | |
import requests |
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
function YahooFinance(ticker) { | |
var ticker = ticker || "GOOG"; | |
ticker = encodeURI(ticker); | |
var response = UrlFetchApp.fetch("https://query2.finance.yahoo.com/v7/finance/options/" + ticker); | |
var chain = JSON.parse(response.getContentText()); | |
return parseFloat(chain.optionChain.result[0].quote.regularMarketPrice); | |
} |
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
Hi | |
You need to | |
1) go to wp-admin settings> general | |
2)WordPress Address (URL) and Site Address (URL) add www to both | |
3)try to connect jetpack again | |
4)when finished remove www again if you want |
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
find . -iname "*png" -print0 | xargs -r0 --max-procs=4 -n1 sh -c 'pngnq -s1 "$1" && advpng -z -4 -q "${1%.*}"-nq8.png' - |
NewerOlder