Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-16"?>
<AnimationPackage xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SourceImagePath>Images/link.png</SourceImagePath>
<Sprites>
<Sprite SpriteIndex="0" SourceX="33" SourceY="476" Width="31" Height="36" />
<Sprite SpriteIndex="1" SourceX="1553" SourceY="635" Width="40" Height="19" />
<Sprite SpriteIndex="2" SourceX="17" SourceY="1586" Width="37" Height="46" />
<Sprite SpriteIndex="3" SourceX="563" SourceY="856" Width="17" Height="26" />
<Sprite SpriteIndex="4" SourceX="979" SourceY="1682" Width="29" Height="20" />
<Sprite SpriteIndex="5" SourceX="425" SourceY="34" Width="31" Height="35" />
@trlewis
trlewis / mc_server_ip.php
Created October 6, 2017 22:13
Keeps track of most recent server IP sent by bash script to the page
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
padding: 5px;
@trlewis
trlewis / BitmapFont.cs
Last active June 23, 2019 03:03
A basic bitmap font implementation for SFML .NET
namespace SFMLNetBitmapFont
{
using System;
using SFML.Graphics;
using SFML.System;
public class BitmapFont : IDisposable
{
private const int StartPixel = 3;
private const int NumAsciiChars = 256;
@trlewis
trlewis / MainWindow.xaml
Created February 25, 2016 19:41
SFML .NET inside a WPF Window test
<Window x:Class="SfmlWpfDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sfmlWpfDemo="clr-namespace:SfmlWpfDemo"
Title="SFML + WPF Demo" Height="350" Width="525">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
@trlewis
trlewis / MainWindow.xaml
Created February 20, 2016 07:25
SFML .Net with WPF
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
Title="MainWindow" Height="350" Width="525">
<Grid x:Name="MyGrid">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
# run this first
import praw
from bot_config import *
r = praw.Reddit('OAuth getter for wizards_to_imgur script')
r.set_oauth_app_info(client_id=reddit_client_id,
client_secret=reddit_client_secret,
redirect_uri=reddit_redirect_uri)
__author__ = 'travisl'
# This is an implementation of Langton's ant, written in Python using SFML
# Wikipedia article: http://en.wikipedia.org/wiki/Langton%27s_ant
import sfml as sf
UP = 0
RIGHT = 1
DOWN = 2
@trlewis
trlewis / main.cpp
Last active August 29, 2015 14:09
factorial zeroes 2
#include <iostream>
#include <ctime>
int CountZeroes(int n);
int CountFivesInFactorization(int n);
bool IsPrime(int n);
int main()
{
int n = 0;
@trlewis
trlewis / Program.cs
Last active August 29, 2015 14:08
factorial zeroes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PrimeFactorization
{
class Program
{