Skip to content

Instantly share code, notes, and snippets.

View stalinkay's full-sized avatar
💭
Ominverse 🌌

Stalin Kay stalinkay

💭
Ominverse 🌌
View GitHub Profile
@stalinkay
stalinkay / .htaccess
Created April 27, 2022 12:48 — forked from NinjaPress/.htaccess
Evitando bots e user-agents maliciosos via .htaccess do Wordpress
#Block Against User-Agents and Bots
<IfModule mod_setenvif.c>
SetEnvIfNoCase User-Agent ^$ keep_out
SetEnvIfNoCase User-Agent (casper|cmsworldmap|diavol|dotbot) keep_out
SetEnvIfNoCase User-Agent (flicky|ia_archiver|jakarta|kmccrew) keep_out
SetEnvIfNoCase User-Agent (libwww|planetwork|pycurl|skygrid) keep_out
SetEnvIfNoCase User-Agent (purebot|comodo|feedfinder|turnit) keep_out
SetEnvIfNoCase User-Agent (zmeu|nutch|vikspider|binlar|sucker) keep_out
<Limit GET POST PUT>
Order Allow,Deny
@stalinkay
stalinkay / docker-compose.yml
Created April 12, 2022 17:05 — forked from michaelbragg/docker-compose.yml
Docker | WordPress | Mailhog: Add the ability to send email from WordPress and have it caught in Mailhog.
volumes:
db_data:
version: '3.7'
services:
mysql:
container_name: mysql
image: mysql:5.7
volumes:
@stalinkay
stalinkay / backports.pref
Created April 12, 2022 14:00 — forked from slav0nic/backports.pref
debian bullseye sources.list
Package: *
Pin: release n=bullseye-backports
Pin-Priority: 900
@stalinkay
stalinkay / sources.list
Created April 12, 2022 13:47 — forked from gustavorv86/debian-11-bullseye-sources.list
Debian Bullseye/Stable official repositories
deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
deb-src http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free
@stalinkay
stalinkay / deployment_aliases.sh
Created March 30, 2022 16:09 — forked from anshulsahni/deployment_aliases.sh
List of different kinds of aliases I use
### deployment tool aliases
## docker
# docker image
alias dckils='docker image ls'
alias dckilsa='docker image ls -a'
# docker container
alias dckcls='docker container ls'
@stalinkay
stalinkay / .hyper.js
Created March 29, 2022 16:22 — forked from robertcoopercode/.hyper.js
Hyper Configuration
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
updateChannel: 'stable',
@stalinkay
stalinkay / pre-push
Created March 7, 2022 16:14 — forked from davidpdrsn/pre-push
Git pre-push hook that prevents you from pushing commits with "WIP" in the message
#!/bin/sh
# Prevent you from pushing commits that have "WIP" in the message
branch=`git branch 2>/dev/null | grep '^*' | colrm 1 2`
git log $branch ^origin/$branch --pretty="format:%h %s" | grep "WIP"
if [[ $? -eq 0 ]]; then
echo "Found commits with WIP messages"
exit 1
# This snippet checks your current directory for a .ruby-version file
# and if it exists, it then checks to see if that version of ruby is
# installed. If not, it will ask you if you want to install it.
#
# Add this snippet to $HOME/.zshrc
# In zsh, the chpwd will run a command every time you change directories.
function chpwd {
# Check if a .ruby-version file exists
if [[ -f "$PWD/.ruby-version" ]]; then
@stalinkay
stalinkay / decimalize_git_hash.bash
Created February 17, 2022 23:11 — forked from hborders/decimalize_git_hash.bash
Print the given git hash + a prepended "1" in decimal form
#!/bin/bash -euo pipefail
if [ ${#} -eq 0 ]
then
# read from STDIN
MAYBE_GIT_HASH=$( cat )
else
MAYBE_GIT_HASH="${1}"
fi
@stalinkay
stalinkay / minutes_since_date.bash
Created February 17, 2022 23:11 — forked from hborders/minutes_since_date.bash
Print the number of minutes since a given date
#!/bin/bash -euo pipefail
if [ ${#} -eq 0 ]
then
# read from STDIN
DATE=$( cat )
else
DATE="${1}"
fi