Skip to content

Instantly share code, notes, and snippets.

View drguildo's full-sized avatar

Simon Morgan drguildo

View GitHub Profile
Error.stackTraceLimit = Infinity;
const request = require("request");
const FeedParser = require("feedparser");
const feedUrl = "https://news.ycombinator.com/rss";
function foo() {
let feedparser = new FeedParser();
@drguildo
drguildo / .eslintrc.json
Created June 19, 2017 12:56
My .eslintrc.json
{
"env": {
"es6": true,
"node": true
},
"parserOptions": {
"sourceType": "module"
},
"rules": {
"no-const-assign": "warn",
@drguildo
drguildo / rss.js
Created June 16, 2017 14:23
Hacker News post fetcher
var request = require("request");
var FeedParser = require("feedparser");
var req = request("https://news.ycombinator.com/rss");
var feedparser = new FeedParser();
req.on("error", function (error) {
console.log(error);
});
@drguildo
drguildo / gist:53ba27693d31a345708aac6d4f666fd0
Created April 27, 2017 14:29
Convert large GIFs to MP4.
find . -iname "*.gif" -size +500k -exec ffmpeg -i {} `basename {} .gif`.mp4 \;
@drguildo
drguildo / Reigns.ahk
Last active April 17, 2017 16:24
An AutoHotKey program that plays the game Reigns automatically.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#IfWinActive Reigns
Loop {
Sleep, 3000
WinGetPos, , , width, height, A
Random, rand, 0, 1
@drguildo
drguildo / Removed Games.txt
Last active April 12, 2017 18:44
Removed games I own.
.atorb.
Actua Soccer 3
Adam's Venture Episode 1: The Search For The Lost Garden
Adam's Venture Episode 2: Solomon's Secret
Adam's Venture Episode 3: Revelations
AERENA - Masters Edition
Balls of Steel
BanHammer
Batman: Arkham Asylum
Blood of Old (OLD VERSION)
@drguildo
drguildo / sqrt.go
Created February 17, 2017 22:19
A Go implementation of Newton's method for finding the square root of a number.
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
return SqrtNewton(x, x)
}
@drguildo
drguildo / Rename.bat
Last active August 17, 2022 19:22
A batch file for automatically renaming and organising images and videos into folders by date.
REM Use exiftool -s <filename> to list the tag names available for a file
REM Google Photos uses these if it doesn't find any metadata (and it doesn't do
REM a good job of looking).
exiftool "-FileCreateDate<DateTimeOriginal" "-FileModifyDate<DateTimeOriginal" *.*
exiftool "-Directory<DateTimeOriginal" -d "%%Y/%%B" *.jpg *.mp4 *.mts *.m2ts *.mov
exiftool "-Directory<CreateDate" -d "%%Y/%%B" *.jpg *.mp4 *.mts *.m2ts *.mov
@drguildo
drguildo / fallout-new-vegas-mods.md
Last active September 26, 2023 15:49
Fallout: New Vegas mods that I recommend.

This is a conservative list of mods for Fallout: New Vegas which I feel improve what's already there rather than changing it (much).

Important

  • Install xNVSE.
  • Install FNV 4GB Patcher. I used to use FNV4GB but it prevented me from using ReShade. Even if you don't use ReShade this is probably still the better option as it simply patches the New Vegas executable rather than using in-memory patching and an extra executable.
  • Install New Vegas Tick Fix.
  • Install New Vegas Heap Replacer. Replaces the game's heap memory management system with a faster implementation.
@drguildo
drguildo / Exercise2_3.pde
Created October 11, 2016 13:59
The Nature of Code - Exercise 2.3
Mover[] movers = new Mover[4];
void setup() {
size(800, 320);
for (int i = 0; i < movers.length; i++) {
movers[i] = new Mover(random(0.1, 5), random(0, width), random(0, height));
}
}