- Type in the search field:
^(.*)(\r?\n\1)+$
- type in the "replace with" field:
$1
- Click "Replace 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
import sys | |
import codecs | |
if (len(sys.argv) < 2): | |
print('Usage: python3 ./delete_duplicate_lines.py /path/to/target/file') | |
sys.exit(1) | |
def uniquelines(lineslist): | |
unique = {} | |
result = [] |
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
// Promise while that return promise | |
var P = require('bluebird'); | |
var promiseWhile = P.method(function(condition, action) { | |
if (!condition()) {return;} | |
return action().then(promiseWhile.bind(null, condition, action)); | |
}); | |
/* |
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
zip -9 -rq $(echo Archive-Name-$(date +%y%m%d%H%M).zip) . -x \*.git\* -x \*.zip\* -x \*.DS_Store\* |
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
ORGANIZATION=<organization name> | |
curl -s https://api.github.com/orgs/$ORGANIZATION/repos\?per_page\=200&access_token=<access_token> | grep clone_url | awk -F '"' '{print $4}' | xargs -n 1 -P 4 git clone |
A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
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 filter-branch --index-filter "git rm -rf --cached --ignore-unmatch packages/phoenix-data" HEAD | |
rm -rf .git/refs/original/ | |
git reflog expire --all && git gc --aggressive --prune |
I hereby claim:
- I am anasaboureada on github.
- I am aboureada (https://keybase.io/aboureada) on keybase.
- I have a public key ASBqGxyu2chZwpNZfKYc0I5Ajn8Rqwdpfv1ye0MNdKtj-Ao
To claim this, I am signing this object:
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
<html> | |
<body> | |
<a class="weatherwidget-io" href="https://forecast7.com/en/52d374d90/amsterdam/" data-label_1="AMSTERDAM" data-label_2="WEATHER" data-theme="original" >AMSTERDAM WEATHER</a> | |
<script> | |
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src='https://weatherwidget.io/js/widget.min.js';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','weatherwidget-io-js'); | |
</script> | |
</body> | |
</html> |