Skip to content

Instantly share code, notes, and snippets.

View AntoineTurmel's full-sized avatar

Antoine Turmel AntoineTurmel

View GitHub Profile

Half-Life 2 on the Switch

This is a guide for running Half-Life 2 on your Switch. Please be aware that this isn't a great way of playing Half-Life 2 - do not expect this mod to work perfectly.

Thank you to Bringus Studios for fixing save files not showing up!

NOTE: I am assuming that you have basic knowledge about how modding games on the Switch works. I will not provide support for questions like "how do I install Atmosphère / CFW", "how do I make an emuMMC", "how do I extract games", etc. For help with modding your console, see the NH Switch Guide.

WARNING: While this mod should be fairly safe to use, I do not take any responsibility if your Portal save data is deleted, you get banned from Nintendo Switch Online, or if your Switch explodes.

@n-bell
n-bell / TestDatabase.user.js
Created September 13, 2019 22:35
Tampermonkey / Greasemonkey Dexie.js database storage in javascript
// ==UserScript==
// @name TESTDatabase
// @namespace foobar.com
// @version 0.1.1
// @description testing database functionality
// @include https://sample.somesite.com/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
// @require https://unpkg.com/dexie@latest/dist/dexie.js
// @grant GM_getValue
// @grant GM_setValue
@aeris
aeris / death-letter-en.txt
Last active October 4, 2023 10:19
GDPR death letter
Dear Sir/Madam:
I am writing to you in your capacity as data protection officer for your
company. In light of recent spam received on this email address,
I am making this request for access to personal data
pursuant to Article 15 of the General Data Protection Regulation.
I am concerned that your company’s information practices may be putting my
personal information at undue risk of exposure or in fact has breached its
obligation to safeguard my personal information.
@companje
companje / index.html
Last active January 19, 2023 19:37
Ultimaker 3 as Ambient Light - quick demo
<!-- Disclaimer: This experiment was done in 2 hours. So please beware of crappy code. -->
<!-- feel free to use and improve this code. -->
<!-- Rick Companje, Doodle3D, Aug 24th 2017 -->
<html>
<head>
<title>Ulti Hue</title>
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,minimal-ui">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<style>
@rob-smallshire
rob-smallshire / macOS-in-virtualbox.md
Last active April 3, 2024 19:03
Notes on getting macOS Sierra running in Virtualbox on a Windows 10 host

On Mac

Download, but don't run, the Sierra installer from the Mac App Store. This places the installer at /Applications/Install\ macOS\ Sierra.app/.

Now run the following commands to build a suitable VM image from the installer:

git clone https://github.com/jonanh/osx-vm-templates
cd osx-vm-templates/packer

sudo ../prepare_iso/prepare_vdi.sh -D DISABLE_REMOTE_MANAGEMENT -o macOS_10.12.vdi /Applications/Install\ macOS\ Sierra.app/ .

@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@paulirish
paulirish / what-forces-layout.md
Last active April 30, 2024 17:56
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@Tblue
Tblue / mozlz4a.py
Last active April 28, 2024 12:02
MozLz4a compression/decompression utility
#!/usr/bin/env python3
# vim: sw=4 ts=4 et tw=100 cc=+1
#
####################################################################################################
# DESCRIPTION #
####################################################################################################
#
# Decompressor/compressor for files in Mozilla's "mozLz4" format. Firefox uses this file format to
# compress e. g. bookmark backups (*.jsonlz4).
#
@rochow
rochow / snippet.php
Last active December 16, 2020 21:44
Gravity Forms Don't Save Form Entries in Database
<?php
/*
USAGE
add_action( 'gform_post_submission', 'mr_remove_form_entries' ); // ALL FORMS
add_action( 'gform_post_submission_1', 'mr_remove_form_entries' ); // SPECIFIC FORM (ID = 1 in exmaple)
*/
add_action( 'gform_post_submission_1', 'mr_remove_form_entries' );
// Deletes entries from the database on the specified Gravity Forms form(s)
function mr_remove_form_entries( $entry ){
@oneohthree
oneohthree / quick-slugify.sh
Last active February 22, 2024 01:53
Quick bash slugify
echo "$STRING" | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z