Skip to content

Instantly share code, notes, and snippets.

View MarcAlx's full-sized avatar
🌱

MarcAlx MarcAlx

🌱
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.

@hfossli
hfossli / SHA256-Bridging-Header.h
Last active April 9, 2024 01:05
AES 256 in swift 4 with CommonCrypto
#import <CommonCrypto/CommonCrypto.h>
@steveoh
steveoh / update_symbology.py
Created November 13, 2017 23:47
Update layer symbology with arcpy
import json
import arcpy
def resize_symbol(layer):
if not layer.isFeatureLayer:
return
symbology = json.loads(layer._arc_object.getsymbology())
@kubeliv
kubeliv / vibrate.swift
Last active July 1, 2021 14:19
Swift script to consistently vibrate the MacBook touchpad - Updated to macOS 10.13
import AppKit
var i = 1;
while i <= 5000 {
NSHapticFeedbackManager.defaultPerformer.perform(NSHapticFeedbackManager.FeedbackPattern.alignment, performanceTime: NSHapticFeedbackManager.PerformanceTime.now);
i = i + 1
usleep(10000000 / 10000);
}
@fernandohu
fernandohu / Reading configuration files before application startup in Angular2 final release.md
Last active May 8, 2023 16:40
Reading configuration files before application startup in Angular2 final release

Reading data before application startup in Angular 2

In this demonstration I will show you how to read data in Angular2 final release before application startup. You can use it to read configuration files like you do in other languages like Java, Python, Ruby, Php.

This is how the demonstration will load data:

a) It will read an env file named 'env.json'. This file indicates what is the current working environment. Options are: 'production' and 'development';

b) It will read a config JSON file based on what is found in env file. If env is "production", the file is 'config.production.json'. If env is "development", the file is 'config.development.json'.

@anova
anova / Twitter.cs
Created June 8, 2016 04:18
C# twitter application only authentication example (via bearer token)
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
@dkudelko
dkudelko / CustomEntryRenderer_Droid.cs
Created March 21, 2016 08:25
remove a default bottom line on android entry Xamarin.Forms
using Mobile.Droid.Renderers;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: ExportRenderer(typeof(Entry), typeof(CustomEntryRenderer_Droid))]
namespace Mobile.Droid.Renderers
{
public class CustomEntryRenderer_Droid : EntryRenderer
{
@fbaiodias
fbaiodias / README.md
Last active July 21, 2021 19:04
GraphQL circular dependencies

Circular dependencies on GraphQL schemas

Problem

Whenever I uncomment the lines on author.js I get the following error:

/Users/xicombd/Code/taskq/taskq-api/node_modules/graphql/jsutils/invariant.js:20
    throw new Error(message);
    ^
@qizhihere
qizhihere / merge-table.lua
Created July 4, 2015 07:47
merge two tables in lua
function table.merge(t1, t2)
for k,v in ipairs(t2) do
table.insert(t1, v)
end
return t1
end
@demisx
demisx / angularjs-providers-explained.md
Last active May 17, 2024 03:38
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant