Skip to content

Instantly share code, notes, and snippets.

View humbertodias's full-sized avatar

Humberto Dias humbertodias

View GitHub Profile
@humbertodias
humbertodias / GLFW.cs
Last active September 24, 2020 11:57 — forked from andykorth/gist:5100871
GLFW for C#
using System;
using System.Runtime.InteropServices;
// https://stackoverflow.com/questions/10394994/where-can-i-find-custom-opengl-datatypes-in-sharpgl
using GLbitfield = System.UInt32;
using GLboolean = System.Boolean;
using GLbyte = System.SByte;
using GLclampf = System.Single;
using GLdouble = System.Double;
using GLenum = System.UInt32;
@humbertodias
humbertodias / gist:04422f4a4b832d834cedd2b1d56d8f1e
Created September 8, 2020 22:34
Mouse coordinates on Linux
watch -t -n 0.0001 xdotool getmouselocation
@humbertodias
humbertodias / gist:fccb5b90c4ded1191d88cd3171d69a94
Created September 8, 2020 22:23
Enable/Disable mouse on linux
xinput --enable 12
xinput --disable 12
@humbertodias
humbertodias / retroarch-libretro-linux.sh
Last active September 8, 2020 08:38
retroarch command line for libretro
# Linux
sudo snap install retroarch
cd /tmp
# download core
wget http://buildbot.libretro.com/assets/cores/Cannonball/CannonBall.zip
unzip -o CannonBall.zip
cd CannonBall
@humbertodias
humbertodias / disable-ipv6
Last active August 30, 2020 12:23
Linux - Disabling ipv6
Option A:
sudo apt-get -o Acquire::ForceIPv4=true update
Option B:
1. Open Terminal
2. Enter sudo -H gedit /etc/sysctl.conf and open the configuration file and add the following lines at the end
@humbertodias
humbertodias / vimeo-download.py
Created June 9, 2020 19:06 — forked from alexeygrigorev/vimeo-download.py
Downloading segmented video from vimeo
import requests
import base64
from tqdm import tqdm
master_json_url = 'https://178skyfiregce-a.akamaihd.net/exp=1474107106~acl=%2F142089577%2F%2A~hmac=0d9becc441fc5385462d53bf59cf019c0184690862f49b414e9a2f1c5bafbe0d/142089577/video/426274424,426274425,426274423,426274422/master.json?base64_init=1'
base_url = master_json_url[:master_json_url.rfind('/', 0, -26) + 1]
resp = requests.get(master_json_url)
content = resp.json()
@humbertodias
humbertodias / mame-rr-with-sf2-hitboxes.sh
Created March 4, 2020 09:48
Mame-rr with sf2-hitboxes
# Dep
# Tested on Ubuntu 20.04
sudo apt install libsdl-ttf2.0-0
# Roms
cd $HOME
mkdir -p mame/roms
cd ~/mame/roms
wget https://ia803104.us.archive.org/0/items/aristmk6/qsound_hle.zip
@humbertodias
humbertodias / setup-c#7-with-unity2018-2.md
Last active January 26, 2020 01:24 — forked from pflannery/setup-c#7-with-unity2018-2.md
Setup C# 7.x compilation in Unity 2018.2 and Visual Studio 2017

Set the unity scripting runtime to ".NET 4.x Equivalent"

In Unity goto "Edit->Preferences->Player" then find and set "Scripting Runtime Version*" to ".NET 4.x Equivalent"

Install Unity's IncrementalCompiler

Add dependency

"com.unity.incrementalcompiler": "0.0.42-preview.31"

@humbertodias
humbertodias / gist:3ca47eba20b9cdadd562a2d8ec1cb1c2
Created August 18, 2019 21:06
Converting mp4 to mkv with subtitles
#!/bin/bash
dep(){
sudo apt install mkvtoolnix iconv
}
convertToMkv(){
INPUT_FILE=$1
SRT_FILE=$2
OUTPUT_FILE=$3
@humbertodias
humbertodias / gist:17f1061d9192927cb77ccb8b1c0ad95a
Created January 4, 2019 01:20
Google Drive - Download file
pip install gdown
FILE_ID=1OrIMj2VdLM1wBonrV2jKVqVQTPSQMjnf
gdown "https://drive.google.com/uc?id=$FILE_ID"