Skip to content

Instantly share code, notes, and snippets.

View Archerofyail's full-sized avatar

Lexi Daniels Archerofyail

  • Red Deer, Alberta
View GitHub Profile
@Archerofyail
Archerofyail / TotalPurchaseCount.js
Last active December 22, 2023 02:59
Gets all purchases made from steam's purchase history page and adds them up. Ignores refunds, community market transactions, and purchases that use wallet funds. Made for CAD, so remove the 1.3 multiplier if you're using USD or another currency.
var purchaseTotals = document.getElementsByClassName("wht_total");
var itemList = document.getElementsByClassName("wht_items");
var typeList = document.getElementsByClassName("wht_type");
var total = 0;
var matchPrice = /\d{1,3}\.\d{2,2}/i;
var count = 0;
var i = 0;
var walletDeductions = 0;
console.log("purchaseList count is " + purchaseTotals.length + ". itemList count is " + itemList.length + ". typeListCount is ");
for (var purchaseDiv of purchaseTotals)
@Archerofyail
Archerofyail / FolderBackup.cs
Last active September 26, 2019 03:08
Saves a copy of all files in a specified folder to another specified folder every 5 minutes, or manually when you press the S key. Folders are specified in arguments e.g. Backup.exe <SourceFolder> <DestFolder> --manual||-m, or in a text file next to the exe named paths.txt. The --manual or -m flag makes it so the only time it saves is when you p…
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Threading;
namespace AstroSaveFileCopy
{
// ==UserScript==
// @name Reactor Idle WaterPipe fixer
// @namespace https://gist.github.com/Archerofyail/003da9e8c8ff81cf612ec2c47dd2f005
// @version 0.1
// @description Fix water pipes in reactor idle
// @author Chronial
// @match http://reactoridle.com/
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Full screen Floatplane
// @namespace https://gist.github.com/Archerofyail/41d09c935a5dca6043dbad1f1750a9db
// @version 1
// @description Makes the videos on floatplane take up the full width of the window. Also reduces the width of the sidebar to only show icons
// @author Archerofyail
// @match http*://www.floatplane.com/*
// @grant none
// ==/UserScript==
@Archerofyail
Archerofyail / FlipViewImageTemplate.xaml
Created April 2, 2017 00:46
Template for displaying images in a flipview
<FlipView.ItemTemplate>
<DataTemplate>
<StackPanel>
<ScrollViewer ZoomMode="Enabled"
MinZoomFactor="1"
MaxZoomFactor="8"
AllowFocusOnInteraction="True"
HorizontalScrollMode="Enabled"
VerticalScrollMode="Enabled"
HorizontalScrollBarVisibility="Auto"
@Archerofyail
Archerofyail / TimeSlowed
Created August 23, 2014 18:53
a script that slows down a rigidbody in unity by timeSlowFactor
using System;
using UnityEngine;
/// <summary>
/// The script added to an object that has been time slowed.
/// Do not add this to something yourself.
/// </summary>
public class TimeSlowed : MonoBehaviour
{
//The number of times to slow down the object. e.g. setting it to 0.5 would slow down the object by half/it would be going 50% as fast
// FriendCommTracker.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
void updateList(int numOfFriend, int daysSinceLastComm, int *listOfFriends);
void displayList(int *timeSinceContact, std::string *nameOfFriends, int numOfRows);
int _tmain(int argc, _TCHAR* argv[])
{