Skip to content

Instantly share code, notes, and snippets.

View xDShot's full-sized avatar

xDShot

  • Digital Hell
View GitHub Profile
@Meister1593
Meister1593 / patch_bindings_spam.sh
Last active April 7, 2024 17:07
Updated for steamvr 2.3.5
#!/bin/bash
echo "Latest known working version for patching: 2.3.5"
if [[ -z "$1" ]]; then
echo 'Enter absolute path to SteamVR (for example, /home/user/.local/share/Steam/steamapps/common/SteamVR)'
read STEAMVR_PATH
else
STEAMVR_PATH="$1"
fi
#!/bin/bash
# discordencode - encodes a video file to under 8MiB for Discord
usage () {
echo "Usage: [USEAUDIO=1] [VPRESET=x264-preset] discordencode input output.mp4"
}
if [ -z "$1" ]
then
usage
exit 1
fi
@dim13
dim13 / try.c
Created August 9, 2019 12:28
try/catch in plain c
#include <err.h>
#include <stdio.h>
#include <setjmp.h>
#include <signal.h>
static sigjmp_buf exception;
#define try if (!sigsetjmp(exception, 1))
#define catch else
#define throw siglongjmp(exception, 1)
@RebelLion420
RebelLion420 / TermuxArchSetup2020.md
Last active April 12, 2024 06:06
How to set up Arch Linux in Termux on Android

So, to get started you need to get the base OS installed using the instructions from the official docs .

$ pkg update

$ pkg install bsdtar wget proot tergent tmux openssh

Tmux is a multiplexer that lets you run multiple persistent windows and sessions on a single terminal. I had trouble getting it working in the Arch proot, so a workaround is configuring tmux from your host Termux and then creating a tmux session and starting the chroot from there. For more information on using tmux read this article, and to learn how to customize the appearance and behaviors more try this one as well as looking at the tmux-plugins Github organization for community-built add-ons.

$ termux-setup-storage

@cryzed
cryzed / fix-infinality.md
Last active May 8, 2024 17:00
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@p440
p440 / icarus.lua
Created May 7, 2016 19:44
icarus has found you
do --welcome to the demo please paste me into lua.org/demo
local g = {s="\32",k="\37\99",n="\n"} --space, uhhh???, newline
local data = {
{0x49434152,0x55532046,0x4F554E44,0x20594F55,0x21212100}, --the message
{0x52554E20,0x5748494C,0x4520594F,0x55204341,0x4E212121}} --encoded in 4b segs
local f,r,w = string.format,string.rep,io.write --wrap some funcs for smallness
local dc = function (data) -- de coder
local d,f = {},math.floor --more smallness
d[1] = f(data/16777216) --first byte
d[2] = f((data-d[1]*16777216)/65536) --the second
@steevp
steevp / openmw_steam.py
Last active January 17, 2024 10:42
Launch openmw and have Steam track your gameplay hours, etc as if you were playing Morrowind
#!/usr/bin/env python
import os
import sys
from ctypes import CDLL
from subprocess import call
# Morrowind
os.environ["SteamAppId"] = "22320"
# Enable Steam Overlay
@iDevPy
iDevPy / centos_python_env_setup
Last active March 23, 2017 07:21 — forked from floer32/centos_python_env_setup
CentOS 7: Install Python 3.5.1, pip, virtualenv, and virtualenvwrapper on CentOS. Run this script as "root (sudo su -)" without sudo.
#!/bin/bash
#####################################################################
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
# Copyright (C) 2015 Ivan Rivera
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
@z3ntu
z3ntu / mayaOnUbuntu.sh
Last active November 1, 2019 19:37 — forked from Era-Dorta/mayaOnUbuntu.sh
Shell script for installing Maya 2016 SP4. Tested on Ubuntu 15.10
#!/bin/bash
# Heith Seewald 2012
# Garoe Dorta 2015
# Luca Weiss 2015
# Also based on https://gist.github.com/MichaelLawton/ee27bf4a0f591bed19ac
# Feel free to extend/modify to meet your needs.
#### Lets run a few checks to make sure things work as expected.
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then
@edolganov
edolganov / main_out.js
Created May 10, 2015 17:19
agar.io game client with bots
//replace http://agar.io/main_out.js by this file
//with Fiddler Web Debugger (AutoResponder tab)
//bots can be created in different rooms - so try restart the page if need
var totalBotCount = 0;
function game(h, r, bot, botUrl, botName) {