Skip to content

Instantly share code, notes, and snippets.

View anthonyaxenov's full-sized avatar

Anthony Axenov anthonyaxenov

View GitHub Profile
@shakahl
shakahl / gitlabApiClient.sh
Created May 19, 2022 20:23 — forked from djfdyuruiry/gitlabApiClient.sh
GitLab API Client Written in Bash
#!/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
@MitchRatquest
MitchRatquest / setup_gitea.sh
Last active April 23, 2025 15:14
Setup a local gitea server with nginx proxy
#!/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
<?php
declare(strict_types=1);
/**
* Computes the difference between two dates in milliseconds.
*
* @psalm-pure
*
* @return int $a - $b
<?php
declare(strict_types=1);
namespace Infrastructure\Uuid;
use Ramsey\Uuid\Nonstandard\UuidV6;
use Ramsey\Uuid\Rfc4122\UuidV1;
use Ramsey\Uuid\Uuid;
@akunzai
akunzai / .zshenv
Last active March 30, 2025 15:51
My ZSH profile
# 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'
@shakahl
shakahl / one_liners.md
Created September 29, 2019 22:05 — forked from brannondorsey/one_liners.md
One Liners

Count the number of unique characters in a file

# 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

Replace a string in all instances of files in a directory

@AlexZeitler
AlexZeitler / setup-oh-my-zsh-powerlevel9k.sh
Created May 13, 2018 19:30
Installing zsh / oh-my-zsh / Powerlevel9k on Ubuntu 18.04
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."
@keeferrourke
keeferrourke / install-google-fonts.sh
Last active May 22, 2023 12:38
A bash script to install all Google Fonts, system wide, on debian based systems (ex. Ubuntu)
#!/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"
@kwn
kwn / xdebug.ini
Last active November 11, 2021 10:18
Xdebug config with autostart
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