Skip to content

Instantly share code, notes, and snippets.

@0xAether
0xAether / uuid.php
Created May 30, 2013 23:08
A simple PHP page to display server-side generated UUIDs
<!doctype html>
<head>
<meta charset="UTF-8">
<title>UUID Generator</title>
<style>
body {
background-color: #e8e8f0;
}
h1 {
font-family: georgia, sans-serif, verdana, helvetica;
@0xAether
0xAether / primes.c
Last active December 16, 2015 22:20
/*
*To-do:
* - Use bitwise operations for everything
* - Add ability to output to a file
*/
#include <stdio.h>
#include <stdbool.h>
#include <limits.h>
@0xAether
0xAether / simpledesks.sh
Last active February 14, 2017 20:50
A bash function to scrape the wallpaper site ``simpledesktops.com"
function simpledesks() {
useragent='Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36' # Mimic Google Chrome 33.0.1750.117 on 64-bit Windows 8.1
if [ $# != 1 ]
then
echo 'Enter the number of pages you want to scrape as the only argument. Each page has (give or take) 28 images. The total number of pages at this time is 46.'
return 1
elif [ $1 -gt 46 ]
then
limit=46
@0xAether
0xAether / 4chan.sh
Last active April 28, 2021 15:00
A bash function to download all the images in a 4chan thread
function 4chan() {
if [[ $# -ne 1 ]]
then
echo 'No URL specified! Give the URL to the thread as the ONLY argument'
return 1
fi
# This should look something like: g/thread/73097964
urlPrimative=$(grep -o '[0-9a-zA-Z]\{1,4\}/thread/[0-9]*' <<< $1)
@0xAether
0xAether / imgur.sh
Created September 14, 2012 20:06
A script that scrapes the image hosting website imgur.com
#!/usr/bin/env bash
while [ 1 == 1 ]
do
##########################################################################
url=$(cat /dev/urandom | tr -cd "[:alnum:]" | head -c 5)
curl -f -s http://imgur.com/$url > /dev/null
exitstatus=$?
@0xAether
0xAether / gist:3468644
Created August 25, 2012 18:04 — forked from anonymous/gist:3468315
Dictionary file
10th
1st
2nd
3rd
4th
5th
6th
7th
8th
9th
@0xAether
0xAether / triforce.c
Created August 10, 2012 19:09
Prints the triforce
/*
*
* Triforce
* By: Aaron
* Started: August 10, 2012
*
*/
#include <stdio.h>
#include <stdlib.h>
@0xAether
0xAether / triforce.sh
Created July 30, 2012 22:43
Prints the triforce
#!/usr/bin/env bash
#
# Triforce
# By: Aaron
# Date: July 30, 2012
#
# This script will only accept one argument that should be a number greater than or equal to 11.
# It will print a triforce symbol with the base being as wide as the nearest odd number to the one provided.
#
# Screenshot: http://newroman.net/permalink/triforce.png
@0xAether
0xAether / inverted_pyramid.sh
Created July 28, 2012 20:14
Prints an inverted pyramid.
#!/usr/bin/env bash
#
# Inverted Pyramid
# By: Aaron
# Date: July 28, 2012
#
# This script will only accept one argument that should be a number.
# It will print an upside down pyramid that starts at the nearest odd number to the one you provided.
#
# Screenshot: http://newroman.net/permalink/inverted_pyramid.png
@0xAether
0xAether / logcleanup.sh
Created May 10, 2012 20:15
Simple script to clean up Minecraft log files from the "Can't keep up" messages.
#!/usr/bin/env bash
# Cleans up Minecraft log files from those pesky "Can't keep up" messages.
if [ $# -gt 1 ] || [ $# = 0 ]
then
echo 'This script requires one argument. That should be the name of the log file.'
exit 2
else
: