Skip to content

Instantly share code, notes, and snippets.

View alinradut's full-sized avatar

alinradut

  • Targu Mures, Romania
View GitHub Profile
@alinradut
alinradut / gist:f9f073e73e65ce6259ba326d69d08d26
Last active April 11, 2019 08:16
Setting up dmarc reports for a domain on Ubuntu

Create a user/database combo in MySQL, username dmarc, password [generated]

Install the dependencies:

apt-get install libmail-imapclient-perl libmime-tools-perl libxml-simple-perl \
libclass-dbi-mysql-perl libio-socket-inet6-perl libio-socket-ip-perl libperlio-gzip-perl \
libmail-mbox-messageparser-perl unzip
@alinradut
alinradut / github-to-bitbucket
Last active February 11, 2020 15:27 — forked from sangeeths/github-to-bitbucket
Forking a Github repo to Bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone git@bitbucket.org:abc/myforkedrepo.git
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync git@github.com:def/originalrepo.git
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v
iptables -I INPUT -p udp --dport 1:65535 -j DROP
iptables -I INPUT -p udp --sport 1:65535 -j DROP
iptables -I OUTPUT -p udp --dport 1:65535 -j DROP
iptables -I OUTPUT -p udp --sport 1:65535 -j DROP
iptables -I FORWARD -p udp --dport 1:65535 -j DROP
iptables -I FORWARD -p udp --sport 1:65535 -j DROP
# allow DNS on port 53
iptables -I INPUT -p udp --sport 53 -j ACCEPT
iptables -I INPUT -p udp --dport 53 -j ACCEPT
#!/usr/bin/env ruby
# coding: utf-8
# <bitbar.title>GeoIPWeather</bitbar.title>
# <bitbar.version>v0.1.1</bitbar.version>
# <bitbar.author>Taylor Zane</bitbar.author>
# <bitbar.author.github>taylorzane</bitbar.author.github>
# <bitbar.desc>Your weather in the menu bar 🌤</bitbar.desc>
# <bitbar.image>http://i.imgur.com/vrT6vfb.png</bitbar.image>
# <bitbar.dependencies>ruby</bitbar.dependencies>
@alinradut
alinradut / symbolicate.rb
Created December 2, 2022 13:33 — forked from dceddia/symbolicate.rb
Symbolicate a macOS crash report from Sentry
#!/usr/bin/env ruby
# colorization without needing a gem
class String
def colorize(color_code)
"\e[#{color_code}m#{self}\e[0m"
end
def red
colorize(31)
@alinradut
alinradut / remove-all-from-docker.sh
Created August 16, 2023 10:46 — forked from beeman/remove-all-from-docker.sh
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes