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
$ 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 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 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 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 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 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 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' - |
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
pngnq -s1 image.png && advpng -z -4 -q image-nq8.png |
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
viman () { text=$(man "$@") && echo "$text" | vim -R +":set ft=man" - ; } |
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
You can make urxvt copy to both Primary and Clipboard with the selection-to-clipboard perl extenion. This keeps them in sync, so you just copy once in urxvt and it should work in applications that use either. | |
URxvt.perl-ext-common: selection-to-clipboard |
NewerOlder