Skip to content

Instantly share code, notes, and snippets.

Avatar
🌸

Arianna Story AuroraAri

🌸
View GitHub Profile
@AuroraAri
AuroraAri / Infobox.xml
Created Jun 14, 2017
An XML file with Wikipedia's infobox template (non-Lua version)
View Infobox.xml
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
<siteinfo>
<sitename>Wikipedia</sitename>
<dbname>enwiki</dbname>
<base>https://en.wikipedia.org/wiki/Main_Page</base>
<generator>MediaWiki 1.28.2</generator>
<case>first-letter</case>
<namespaces>
<namespace key="-2" case="first-letter">Media</namespace>
<namespace key="-1" case="first-letter">Special</namespace>
View gist:ed95c3b9eadacb1727f1c8774c9b7093
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQINBFdoPZABEADD8ucyDicUjge0rmvjAj9FScX2773yn4wbtokbW7jeirQPuJhh
LB5M94qvdrBFpe5iQY43OJ/LW1qS48UJ8x3nk+Kr482Zuvz3BKzXJW5JMSFPU2DI
sf5OFzVL2/O9hTqPyUapJmmKUO/e5fPi8mvlEeDwDJ2KcBS9gVgAH6FtOBxIlvCT
Fj/nrYc0dv5oGTA7yEZ4hDjx+C9i823Vw9HZEwFVI9Lladu4ooV4vVIBOfzYATeX
WGD+XvJdeWLihY3EjpRbB4T9SxdD0XgcuvMP+zJDXA/jVs9wBdy/LkpRYUFHKaRv
tjKyjE3MTfe7YgYkAGT/S/dvQv4o9fKBw4mXh5ryRN7YZetdVQ4e0fJuU3ru5alU
4/u74+TPh49VK8JwwYEJwux3cYFm9ZMGj0ek0cvJ8opzqcLo85IxvJA/MW8Cj19h
@AuroraAri
AuroraAri / DiscordClient.class.php
Last active Jan 1, 2021
This class lets you send messages to Discord through their webhook service.
View DiscordClient.class.php
<?php
/*
* This class lets you send a message to Discord through a webhook.
*
* Usage:
* $discord = new DiscordClient('URL-FROM-DISCORD-GOES-HERE');
* $discord->name('Optional'); // If not set, uses the name set in Discord
* $discord->avatar('Optional'); // If not set, uses the avatar set in Discord
* $discord->message('Here is where the message can optionally go.'); // If not set, uses the message provided in $this->send()
* $discord->send('Here is where the message can optionally go.');
View keybase.md

Keybase proof

I hereby claim:

  • I am AuroraAri on github.
  • I am auroraari (https://keybase.io/auroraari) on keybase.
  • I have a public key whose fingerprint is 6CD1 884B 82C7 3268 71D4 C9A2 E69C B753 B661 45BE

To claim this, I am signing this object:

@AuroraAri
AuroraAri / YouTubeUpdates.php
Created Jun 9, 2013
This code generates a basic page that shows a text listing of all of your favorite YouTube channels updates. The only configuration is to add each channel to $channels, and run! No API key necessary for this one. You will, however, need a server capable of executing PHP files, of course.
View YouTubeUpdates.php
<?php
/*
Author : Arianna Story at github.com/ariannastory/ | Distributed Under CC-BY-SA 3.9
*/
const CACHE_TIMER = 3600;
const CUTOFF = 604800; /* 86400 * 7 */
$channels = array(
'Channel1', 'Channel2', 'Channel3' // Enter each channel's name here, comma-separated. That should be all!
@AuroraAri
AuroraAri / PlaintextWeather.php
Created Jun 9, 2013
This snippet returns the weather in any given location in plaintext format - nothing fancy. To use it, you need an API key from Wunderground, which you can get at http://www.wunderground.com/weather/api, and you'll need to change $json_string to match your target (i.e. change /NC/Raleigh.json to /GA/Atlanta.json").
View PlaintextWeather.php
<?php
$json_string = file_get_contents("http://api.wunderground.com/api/<your-api-key>/geolookup/conditions/q/NC/Raleigh.json");
$parsed_json = json_decode($json_string);
$temp_f = $parsed_json->{'current_observation'}->{'temp_f'};
$condition = $parsed_json->{'current_observation'}->{'weather'};
echo "${temp_f} - ${condition}";
?>