This file contains 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 | |
# This simple bash script is aimed at excluding some development specific directories. | |
# | |
# In this configuration it will instruct Time Machine to exclude directories named: | |
# - env | |
# - node_modules | |
# - vendor | |
# - venv | |
# |
This file contains 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 { | |
differenceInDays, | |
startOfMonth, | |
startOfWeek, | |
getDate | |
} from 'date-fns' | |
const weekOfMonth = function (date) { | |
const firstDayOfMonth = startOfMonth(date) | |
const firstDayOfWeek = startOfWeek(firstDayOfMonth) |
This file contains 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 | |
namespace App; | |
trait InsertIgnore | |
{ | |
/** | |
* @param array $attributes | |
* | |
* @return static |
This file contains 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 perl | |
use warnings; | |
use strict; | |
use utf8; | |
use IO::File; | |
use IO::Handle; | |
use File::Find::Rule; | |
use File::Spec; | |
use Text::CSV_XS; | |
use Cwd qw(abs_path); |
This file contains 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 python3 | |
__author__ = "Klemen Tušar" | |
__email__ = "[email protected]" | |
__copyright__ = "GPL" | |
__version__ = "1.0.2" | |
__date__ = "2017-01-06" | |
__status__ = "Production" | |
import re, subprocess |
This file contains 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 perl | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
use File::Basename; | |
use IO::File; | |
my $debug = 0; | |
my $restore = defined $ARGV[0] && $ARGV[0] eq '--restore' ? 1 : 0; # optional --restore command line argument | |
my $config_file = dirname(__FILE__) . '/iptables_configuration.txt'; |
This file contains 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 | |
if [[ -z $1 ]] ; then | |
echo "psky.sh <IP>" | |
echo "" | |
echo "Protected SKY IP checker" | |
echo "Check if the given IP is blacklisted" | |
echo "" | |
return 1; | |
fi | |
REVERSE=$(echo $1 | awk -F '.' '{ print $4 "." $3 "." $2 "." $1 }') |
This file contains 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 | |
# This script will give you a random English insult pulled from the url below. | |
# Evil hint: set up a cronjob :D | |
curl -s 'http://www.hyperhero.com/en/insults.htm' | | |
awk '/BEGINN INSULTS/ { show=1; next } /END INSULTS/ { show=0 } show' | | |
grep -oPi '^.*<br>' | | |
sed 's/<br>//' | | |
shuf -n 1 | |
This file contains 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 python3 | |
__author__ = "Klemen Tušar" | |
__email__ = "[email protected]" | |
__copyright__ = "GPL" | |
__version__ = "1.0.2" | |
__date__ = "2017-02-22" | |
__status__ = "Production" | |
import os, smtplib, validators |
This file contains 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 python3 | |
import logging | |
import sqlite3 | |
import sys | |
import re | |
from math import ceil | |
from os.path import realpath, isfile | |
import mysql.connector | |
from mysql.connector import errorcode |
NewerOlder