Skip to content

Instantly share code, notes, and snippets.

View josefnpat's full-sized avatar
what

Seppi josefnpat

what
View GitHub Profile
@netj
netj / memusg
Last active June 25, 2024 17:39
memusg -- Measure memory usage of processes
#!/usr/bin/env bash
# memusg -- Measure memory usage of processes
# Usage: memusg COMMAND [ARGS]...
#
# Author: Jaeho Shin <netj@sparcs.org>
# Created: 2010-08-16
############################################################################
# Copyright 2010 Jaeho Shin. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
@lukegb
lukegb / vvvvvv_music_unpacker.py
Created August 24, 2011 21:15
Unpack music from VVVVVV's music file!
f = open("vvvvvvmusic.vvv", 'rb')
q = f.read()
FILE_NAMES = ['0levelcomplete.ogg','1pushingonwards.ogg','2positiveforce.ogg','3potentialforanything.ogg','4passionforexploring.ogg','5intermission.ogg','6presentingvvvvvv.ogg','7gamecomplete.ogg','8predestinedfate.ogg','9positiveforcereversed.ogg','10popularpotpourri.ogg','11pipedream.ogg','12pressurecooker.ogg','13pacedenergy.ogg','14piercingthesky.ogg']
startAt = endAt = -1
musStartAt = musEndAt = -1
currentMus = 0
while True:
oldStartAt = startAt
@vrld
vrld / gist:5166463
Created March 15, 2013 00:14
make love
love=$(/usr/bin/env love)
zip=$(/usr/bin/env zip)
luac=$(/usr/bin/env luac)
# path to win and osx distributions
windir=~/Stuff/love-win-x86
osxapp=~/Stuff/love.0.8.app
game=TITLE-OF-THE-GAME.love
@aras-p
aras-p / preprocessor_fun.h
Last active June 21, 2024 12:20
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@swarminglogic
swarminglogic / watchfile.sh
Last active March 4, 2024 14:44
watchfile - monitor file(s) and execute a command when files are changed
#!/bin/bash
version=1.0.1
versionDate="2014-02-14"
function showHelp() {
echo "watchfile - monitor file(s)/command and perform action when changed
Possible ways of usage
----------------------------------------
@namuol
namuol / INSTALL.md
Last active July 24, 2023 11:53
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@casaval
casaval / gist:61b9808c90716ed6407f
Created June 24, 2014 04:58
Install love2d 0.9.1 on crunchbang debian wheezy
#step 1: install SDL
hg clone http://hg.libsdl.org/SDL
cd SDL
../configure
make [-j 4]
sudo make install
@swarminglogic
swarminglogic / userpass.sh
Last active December 1, 2015 21:52
Command-line utility to manage passwords, protected by sudo
#!/bin/bash
file=/home/$SUDO_USER/.local/share/userpass.list
function showHelp {
version=0.0.2
versionDate="2014-06-24"
echo "$0 - manage passwords
@LPGhatguy
LPGhatguy / luajit-curl.lua
Last active March 19, 2023 09:53
A cURL binding for LuaJIT. Missing some constants presumably, but functional
--[[
LuaJIT-cURL
Lucien Greathouse
LuaJIT FFI cURL binding aimed at cURL version 7.38.0.
Copyright (c) 2014 lucien Greathouse
This software is provided 'as-is', without any express
or implied warranty. In no event will the authors be held
liable for any damages arising from the use of this software.
@airstruck
airstruck / multilove.md
Last active October 31, 2018 14:02
Installing multiple versions of LÖVE

Installing multiple versions of LÖVE

This document explains how to set up multiple LÖVE installations. Make sure you have all dependencies for the versions of LÖVE you want to install.

Initial setup

Make a directory to install LÖVE source and binaries into.

mkdir $HOME/love/