Skip to content

Instantly share code, notes, and snippets.

@dillera
dillera / mastodon_backup.sh
Created December 23, 2022 21:06 — forked from nolanlawson/mastodon_backup.sh
Script to back up a Mastodon instance (for non-dockerized installs)
#!/usr/bin/env bash
#
# Make a backup file of a Mastodon instance. The backup file is a TGZ containing
# the Postgres dump as well as the /public/system (media) files and the
# .env.production file. For loading the dump file contents, see:
# https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Migration-guide.md
#
# Usage: ./mastodon_backup.sh my_dump_file.tgz
#
# Advanced usage: MASTODON_LIVE_DIRECTORY=/path/to/live ./mastodon_backup.sh my_dump_file.tgz
#!/usr/sgug/bin/bash
# This script should be run as your user!
# Some useful variables
build_progress_dir="/usr/people/edodd/btw/tiny_build/output/PROGRESS"
sgug_rse_srpm_archive_root="/usr/people/edodd/rpmbuild/SRPMS"
sgug_rse_git_root="/usr/people/edodd/btw/tiny_build/sgug-rse.git"
sgug_rse_srpm_output_root="/usr/people/edodd/btw/tiny_build/output/SRPMS"
sgug_rse_rpm_output_root="/usr/people/edodd/btw/tiny_build/output/RPMS"
_rpmbuild=$1
if [[ -z $_rpmbuild ]] ; then
@dillera
dillera / log4j_rce_check.py
Created December 16, 2021 14:01 — forked from byt3bl33d3r/log4j_rce_check.py
Python script to detect if an HTTP server is potentially vulnerable to the log4j 0day RCE (https://www.lunasec.io/docs/blog/log4j-zero-day/)
#! /usr/bin/env python3
'''
Needs Requests (pip3 install requests)
Author: Marcello Salvati, Twitter: @byt3bl33d3r
License: DWTFUWANTWTL (Do What Ever the Fuck You Want With This License)
This should allow you to detect if something is potentially exploitable to the log4j 0day dropped on December 9th 2021.
@dillera
dillera / sguworldrebuilder-0.0.4.sh
Created November 19, 2021 22:24 — forked from danielhams/sguworldrebuilder-0.0.4.sh
SGUG World Rebuilding Script
#!/usr/sgug/bin/bash
# Must rebuild: zlib
rpmbuild -ba zlib.spec --nocheck
touch ~/rpmbuild/PROGRESS/zlib.done
# Must rebuild: xz
rpmbuild -ba xz.spec --nocheck
touch ~/rpmbuild/PROGRESS/xz.done
# Must rebuild: xosview
rpmbuild -ba xosview.spec --nocheck
touch ~/rpmbuild/PROGRESS/xosview.done
@dillera
dillera / reclaimWindows10.ps1
Created January 8, 2017 02:01 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@dillera
dillera / ldap2csv.py
Created June 14, 2016 19:59 — forked from JosefJezek/ldap2csv.py
Export Users from Active Directory / LDAP to CSV file with Python
#!/usr/bin/python
# http://www.packtpub.com/article/python-ldap-applications-ldap-opearations
# sudo apt-get install python-ldap
import ldap
host = 'ldap://example.com:389'
dn = 'ldap@example.com'
@dillera
dillera / ldap-helloWorld.rb
Created June 14, 2016 19:36 — forked from trepidity/ldap-helloWorld.rb
Example of connecting to eDirectory with a Ruby LDAP script
require 'rubygems'
require 'net/ldap' #gem install --no-rdoc --no-ri net-ldap
ldap = Net::LDAP.new :host => "172.16.138.142",
:port => 389,
:auth => {
:method => :simple,
:username => "cn=admin,o=novell",
:password => "n0v3ll"
}
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9

Install Python

$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7

Symlinks...

@dillera
dillera / hack.sh
Last active September 25, 2021 22:37 — forked from erikh/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://gist.github.com/dillera/8108813/raw/ed65b97d3b910cb3536c3e522d4baebd442ff512/hack.sh | sh
#