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
#!/usr/bin/env bash | |
# -*- coding: utf-8 -*- | |
# vim: set ft=sh et ts=4 sw=4 sts=4: | |
# ================================================================================================= | |
# | |
# Copyright 2022 Serhat Teker <me@serhatteker.com> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at |
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
#!/usr/bin/env bash | |
# -*- coding: utf-8 -*- | |
# vim: set ft=sh et ts=4 sw=4 sts=4: | |
# INFO | |
# -------------------------------------------------------------------------------------- | |
# Free up disk space on Debian, Ubuntu - clean log, cache, archive packages/apt archives, | |
# orphaned packages, old kernel and remove the trash | |
# | |
# Gist repo: |
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
#!/usr/bin/env bash | |
# Bash safeties: exit on error, no unset variables, pipelines can't hide errors | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
# INFO | |
# -------------------------------------------------------------------------------------- | |
# A shell script that downloads and installs Python on an Ubuntu host |
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
{"lastUpload":"2022-05-20T21:49:53.702Z","extensionVersion":"v3.4.3"} |
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
colors: | |
# Default colors | |
primary: | |
background: '0x1e2127' | |
foreground: '0xabb2bf' | |
# Bright and dim foreground colors | |
# | |
# The dimmed foreground color is calculated automatically if it is not present. |
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
# If a virtualenv with name of .venv, load it. | |
auto-venv() { | |
if [ -z "$VIRTUAL_ENV" ]; then | |
if [ -d .venv/ ]; then | |
source .venv/bin/activate | |
fi | |
fi | |
} |
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://editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
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 re | |
import collections | |
def count_words(sentence): | |
word_list = re.findall(r"[\da-zA-Z]+(?:\'[\da-zA-Z]+)?", sentence.lower()) | |
return collections.Counter(word_list) | |
# Alternative |
NewerOlder