Skip to content

Instantly share code, notes, and snippets.

View zQueal's full-sized avatar
🦍

Zach Queal zQueal

🦍
View GitHub Profile
@zQueal
zQueal / btc.fish
Created November 5, 2015 00:57
FishShell function to pull BTC price and watch current BTC buy/sell prices. Requires httpie and jq.
function btc --description 'show the current buy/sell price of btc based on Coinbase prices'
http GET https://api.coinbase.com/v2/prices/buy | jq '{buy: .data.amount}'
http GET https://api.coinbase.com/v2/prices/sell | jq '{sell: .data.amount}'
end
@zQueal
zQueal / bash.sh
Last active October 15, 2015 09:12
#!/bin/bash
# I save important information in text files but I hate that they're not encrypted.
# So I fixed that. Uses GPG to encrypt and decrypt text files (ALL of them) in the current
# directory and then deletes the plain text files leaving only the encrypted files behind.
# Currently no selective file options. Encryption and decryption do all files in the current
# directory. Change `{key_id}' to your 64-bit key fingerprint and `{key_password}` to your key
# password if you want otherwise you'll be prompted (after you remove `--passphrase {key_password}`.
if [ -n "$@" ]; then
@zQueal
zQueal / docx.php
Created July 27, 2015 07:56
Utilizes the zip extension (http://php.net/manual/en/book.zip.php) to access the document.xml file that holds the markup language for contents and formatting of a Word document.
<?php
/**
* Edit a Word 2007 and newer .docx file.
* Utilizes the zip extension http://php.net/manual/en/book.zip.php
* to access the document.xml file that holds the markup language for
* contents and formatting of a Word document.
*
* In this example we're replacing some token strings. Using
* the Office Open XML standard ( https://en.wikipedia.org/wiki/Office_Open_XML )
* you can add, modify, or remove content or structure of the document.
@zQueal
zQueal / blog.md
Last active July 31, 2018 12:00
How to Setup WordPress in Ubuntu 14.04 Using a Remote MySQL Server

About

For this instructional tutorial we'll be exploring the installation and setup of both WordPress v4.0 and the required MySQL database used to support it. However, sometimes we find ourselves in interesting situations which either necessitate or involve remote instances of a MySQL server or database. Quite simply, most of the time remote databases or servers are used for security purposes--specifically security through obscurity and not having all of your eggs in a single basket.

Important: Please ensure that you are correctly modifying usernames, passwords, hostnames and IP addresses to suit your needs. If you do not, this setup will not work correctly for you.

The Setup—LEMP

LEMP (Linux, Nginx, MySQL, PHP) is one of the most stable and widely used production/development environments available to developers. Anything Apache can do, Nginx can do much faster. This includes PHP proc

@zQueal
zQueal / blog.md
Created July 5, 2015 22:28
Passwords for the Modern Age

The Fappening

Many times have I been personal party to a vehement discussion about password security. The general consensus is, is that they're outdated, and a replacement needs to be found because passwords are bad! Personally, I think that's total poppycock. Passwords are not outdated, however, the mentality surrounding them definitely is.

Currently, the world wide media is an uproar over an event, currently labeled as "The Fappening." A crude but arguablly appropriate title to a massive breach in security affecting high profile celeberties such as Jennifer Lawrence, Kate Upton, Avil Lavigne, Lea Michael, and McKayla Maroney. "The Fappening" is simply the exploitation of passwords to gain access to iCloud (cloud backup service specific to apple devices) in which important information such as pictures of an unsavory nature wer

@zQueal
zQueal / blog.md
Last active January 31, 2020 23:19
Necessary Implementation of Adjustable Work Factor Ciphers in Modern Cryptographic Algorithms as it Relates to HeartBleed and OpenSSL

Abstract

In the 24 years since the creation of the world wide web there have been many severe security failures that have resulted in the exposure of sensitive data to the general public or malicious third parties. Most notably is the recent HeartBleed bug for OpenSSL v1.0.1 -- 1.0.2--beta in which a would-be attacker is able to exploit the implementation of the TLS heartbeat extension, which was originally meant to be used for keep-alive messages between client and server, to retrieve sensitive data stored in memory up to and including the server's private key. Already, HeartBleed is being regarded as the single most significant security bug in the history of the Internet; mainly because it was undetected by the community at large for such an extended period of time. The emerging details of HeartBleed revealed that the community of developers who on or with projects which depend on OpenSSL are beginning to rethink their position when it comes to traditional security.

Discovery

The official position fro

@zQueal
zQueal / ban.txt
Last active August 29, 2015 14:12
A list of IP addresses which have been attempting to gain access to a few of my dedicated servers.
219.141.254.244
181.39.37.190
162.244.30.181
142.4.38.36
70.38.63.166
50.57.64.185
222.255.174.84
195.154.164.81
201.234.7.10
192.3.159.181

Keybase proof

I hereby claim:

  • I am zQueal on github.
  • I am zqueal (https://keybase.io/zqueal) on keybase.
  • I have a public key whose fingerprint is 7B5A C030 0E2C 74FD 355C CC81 B1DA 56DC B73E 8516

To claim this, I am signing this object:

@zQueal
zQueal / trash.sh
Last active August 29, 2015 14:06
A simple trash system for UNIX.
TRASH_DIR=~/.Trash # Set the Trash directory
mkdir -p "$TRASH_DIR" # Create it if it's not already created
trash() {
# list trash dir if no arguments given
if [[ -z $1 ]]; then
if _bash_trash_is_empty; then # call _bash_trash_is_empty function, then
echo "$TRASH_DIR: trash is empty" # return that the trash is empty
else
du -csh "$TRASH_DIR"/* # else list the contents of the trash directory
@zQueal
zQueal / default
Created September 25, 2014 04:14
server {
listen 80 default_server;
root /usr/share/nginx/html;
index index.php index.html index.htm;
server_name web.dev; # FQDN
location / {
try_files $uri $uri/ =404;
}