Skip to content

Instantly share code, notes, and snippets.

Junade IcyApril

Block or report user

Report or block IcyApril

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Hash Anonymity
#!/bin/bash
echo -n Password:
read -s password
echo
hash="$(echo -n $password | openssl sha1)"
upperCase="$(echo $hash | tr '[a-z]' '[A-Z]')"
prefix="${upperCase:0:5}"
response=$(curl -s https://api.pwnedpasswords.com/range/$prefix)
while read -r line; do
View keybase.md

Keybase proof

I hereby claim:

  • I am IcyApril on github.
  • I am icyapril (https://keybase.io/icyapril) on keybase.
  • I have a public key whose fingerprint is 66A0 0F19 FD86 6AB3 5BA8 69A5 5A3D 7C3C 60B3 C93A

To claim this, I am signing this object:

@IcyApril
IcyApril / wpmediaexport.rb
Last active Sep 8, 2015
A Ruby script to extract WordPress uploads without resized images.
View wpmediaexport.rb
#!/usr/local/bin/ruby -w
# A Ruby script to extract WordPress uploads, excluding resized images, into a single directory.
# File names will be prepended with the directory #string.
# RUN: ruby wpmediaexport.rb >> wpmediaexport.sh
# THEN REVIEW/RUN: ./wpmediaexport.sh
# Generated shell script will be in wpmediaexport.sh.
# Cd into the uploads directory in WordPress before running.
View backupmysql.sh
# Backup MySQL datbases.
# Change -uroot to -u{username} and -ppassword to -p{password}.
# Or remove -ppassword if you don't have one.
# If you're running this as a cron, remove the .sh extension before putting it in /etc/cron.daily.
# DIRBASE is the folder where the database backups will be stored, they will be stored by day of the month.
#!/bin/bash
DATED=`date +%d`
DIRBASE="/var/www/work/mysqlbackups"
mysqldump -uroot -ppassword --all-databases > ${DIRBASE}/${DATED}.sql
View backupwiki.php
<?php
/*
* A basic PHP script that will allow you to export a MediaWiki pages directly from a database to HTML.
* Perfect for running via a cronjob to create HTML emergency backups of MediaWiki pages.
* This only requires a datbase connection and no modification to MediaWiki.
* Code is terrible, I know, I wrote most of it in nano over SSH. It does the job and not much else.
* I built this while working at Freestone Creative so our emergency documentation was ready as static HTML in emergencies.
* Backups are named by the day of the month followed by .html. They are overwrite the one from last month when a new one is made.
*
You can’t perform that action at this time.