Skip to content

Instantly share code, notes, and snippets.

@JonathanPorta
JonathanPorta / gist:2bdf39d59c9bf75e61f9
Last active November 21, 2017 20:47
How to figure out if a steam app has an update available
Great Example: https://github.com/dgibbs64/linuxgsm/blob/b8312d1160271e4a36a0edada3fa11ba9b5e2cdb/functions/fn_update_check#L109-L127
Steamcmd: steamcmd.exe +login anonymous +app_info_print 258550 +quit
Some potentially helpful thingys:
https://github.com/Philipp15b/go-steamapi
https://github.com/Philipp15b/go-steam
https://steamdb.info/app/740/history/
https://steamdb.info/api/GetRawDepots/?appid=740
@zorgiepoo
zorgiepoo / gist:5f769893ad2a7f58a747
Last active February 11, 2018 16:12
Game speed hack prototype; still WIP
#Game Speed Hack
#Increase x86-64 game by 2x by overriding mach_absolute_time
#May not work on games that call gettimeofday or something else instead
#May not work on games that don't call a time function at all (these areee badddd)
#May also not work if the function is referenced in more than one executable image (eg, local library)
#This is not very robust
from bitslicer import VirtualMemoryError, DebuggerError
import vmprot
SPEED_MULTIPLIER = 2.0
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active November 27, 2024 13:36
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@sindresorhus
sindresorhus / post-merge
Last active July 25, 2024 06:53
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@webdesserts
webdesserts / Gulpfile.js
Last active April 3, 2023 08:16
Automatically reload your node.js app on file change with Gulp (https://github.com/wearefractal/gulp).
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise.
var gulp = require('gulp'),
spawn = require('child_process').spawn,
node;
/**
* $ gulp server
* description: launch the server. If there's a server already running, kill it.
@mtabini
mtabini / gist:1178403
Created August 29, 2011 13:35
PNG representation of NSImage
//
// GRAppDelegate.m
// Testme
//
// Created by Marco Tabini on 11-08-29.
// Copyright (c) 2011 Marco Tabini. All rights reserved.
//
#import "GRAppDelegate.h"