# https://unix.stackexchange.com/questions/5010/how-can-i-count-the-number-of-different-characters-in-a-file
# works for linux. There is a variation for MacOS in the link ^
sed 's/\(.\)/\1\n/g' text.txt | sort | uniq -c # sort -nr # uncomment this to sort the list by frequency
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 | |
######################################################################################################################## | |
# # | |
# GitLab API client written in Bash using the `curl` command # | |
# ----------------------------------------------------------- # | |
# See: https://gist.github.com/djfdyuruiry/9eecf631e3b43fce2a4393d23e03c1ce # | |
# # | |
# Using global configuration: # | |
# # | |
# export GITLAB_URL="https://my-g |
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/bash | |
#this script sets up a git user, installs gitea, a systemd service, and an nginx subdomain redirect | |
#inspired by https://golb.hplar.ch/2018/06/self-hosted-git-server.html | |
DOMAIN=EXAMPLE.COM #Please put your actual domain here | |
GIT_HOME=/opt/git #/home/git in the above tutorial | |
GITEA_PORT=3000 #default, but you can change it | |
if [[ $EUID -ne 0 ]]; then | |
echo "you need to be root" | |
exit 1 |
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
<?php | |
declare(strict_types=1); | |
/** | |
* Computes the difference between two dates in milliseconds. | |
* | |
* @psalm-pure | |
* | |
* @return int $a - $b |
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
<?php | |
declare(strict_types=1); | |
namespace Infrastructure\Uuid; | |
use Ramsey\Uuid\Nonstandard\UuidV6; | |
use Ramsey\Uuid\Rfc4122\UuidV1; | |
use Ramsey\Uuid\Uuid; |
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
# https://www.cyberciti.biz/faq/apple-mac-osx-terminal-color-ls-output-option/ | |
export CLICOLOR=1 | |
export EDITOR=vi | |
# Avoid the `._*` files in tar | |
# https://superuser.com/a/61188 | |
export COPYFILE_DISABLE=1 | |
# https://learn.microsoft.com/dotnet/core/tools/dotnet-environment-variables#dotnet_cli_ui_language | |
export DOTNET_CLI_UI_LANGUAGE='en-us' |
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
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k | |
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf | |
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf | |
mkdir ~/.local/share/fonts/ | |
mv PowerlineSymbols.otf ~/.local/share/fonts/ | |
fc-cache -vf ~/.local/share/fonts/ | |
mkdir ~/.config/fontconfig/conf.d/ | |
mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/ | |
echo "Log out of your session and login again." |
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 | |
# Written by: Keefer Rourke <https://krourke.org> | |
# Based on AUR package <https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ttf-google-fonts-git> | |
# dependancies: fonts-cantarell, ttf-ubuntu-font-family, git | |
sudo apt-get install fonts-cantarell ttf-ubuntu-font-family git | |
srcdir="/tmp/google-fonts" | |
pkgdir="/usr/share/fonts/truetype/google-fonts" | |
giturl="git://github.com/google/fonts.git" |
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
zend_extension=xdebug.so | |
xdebug.default_enable = 1 | |
xdebug.cli_color = 1 | |
xdebug.overload_var_dump = 1 | |
xdebug.var_display_max_children = -1 | |
xdebug.var_display_max_data = 4096 | |
xdebug.var_display_max_depth = 10 | |
xdebug.max_nesting_level = 250 | |
xdebug.remote_enable = 1 |