Skip to content

Instantly share code, notes, and snippets.

View Zazcallabah's full-sized avatar

Peter Hamberg Zazcallabah

View GitHub Profile
@Zazcallabah
Zazcallabah / ControllerEmu.h
Last active August 29, 2015 14:01
dolphin analog triggers transformation
template <typename C, typename S>
void GetState(C* const digital, const C* bitmasks, S* analog, const unsigned int range)
{
const unsigned int trig_count = ((unsigned int) (controls.size() / 2));
for (unsigned int i=0; i<trig_count; ++i,++bitmasks,++analog)
{
if (controls[i]->control_ref->State() == 0)
flag[i] = false; // reset out of transition state if button is no longer pressed
if (controls[i]->control_ref->State() > settings[0]->value) //threshold
{
@Zazcallabah
Zazcallabah / gist:6212977
Created August 12, 2013 17:15
Not getting Papers Please Antegria achievement, problem report.
Theory: How the problem started
===============================
I think I played in offline mode the first time through day five, thus getting the token in my save file but not getting it on steam.
Steps take to solve the issue
=============================
First
-----
Restart steam in online mode. Start papers please. Reload save at day five. Collect token.
@Zazcallabah
Zazcallabah / keybase.md
Created November 1, 2016 12:46
keybase verification

Keybase proof

I hereby claim:

  • I am Zazcallabah on github.
  • I am zazcallabah (https://keybase.io/zazcallabah) on keybase.
  • I have a public key whose fingerprint is 81E5 9B67 1299 B04A 9AAA F829 27E7 6A7B 52D1 6705

To claim this, I am signing this object:

@Zazcallabah
Zazcallabah / data.json
Created November 29, 2016 08:45
Dashing dependency status
{
"info" : {
"buildId" : "20161128.7",
"buildDate" : "2016-11-28 14:01:33Z",
"commitHash" : "5a0bf8b4c25b897f0dee3c7e315422e96a182472",
"deployDate" : "2016-11-28 14:03:44Z",
"error" : null
},
"dependencies" : [{
"name" : "Api1",
@Zazcallabah
Zazcallabah / enable-fiddler-for-az.ps1
Created October 17, 2018 09:12
Enable fiddler MITM for Azure CLI 2
#this script probably needs to be run as admin
#also, openssl is required
#also, you need to export the fiddler root cert to desktop
$out = "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\certifi\cacert.pem"
mv $out "$out.old"
$in = "$($env:USERPROFILE)\Desktop\FiddlerRoot.cer"
& "$PSScriptRoot\bin\openssl.exe" x509 -inform der -in $in -out $out
$env:ADAL_PYTHON_SSL_NO_VERIFY = 1
@Zazcallabah
Zazcallabah / wol.ps1
Created October 17, 2018 09:18
Wake-on-lan trigger
param ([String]$mac = "00:11:22:33:00:11")
$MACAddr = $mac.split(':') | %{ [byte]('0x' + $_) };
$UDPclient = new-Object System.Net.Sockets.UdpClient
$UDPclient.Connect(([System.Net.IPAddress]::Broadcast),4000)
$packet = [byte[]](,0xFF * 6)
$packet += $MACAddr * 16;
[void] $UDPclient.Send($packet, $packet.Length)
@Zazcallabah
Zazcallabah / AzureLogin.ps1
Created December 3, 2018 11:26
Azure Service Principal Login
$uri = "https://login.microsoftonline.com/$($tenant)/oauth2/token"
$data = @{
"resource"="https://management.core.windows.net/";
"client_id"=$servicePrincipalGuid;
"client_secret"=$secret;
"grant_type"="client_credentials";
}
return Invoke-WebRequest -Method POST -Uri $uri -Headers $headers -Body $data | ConvertFrom-Json
@Zazcallabah
Zazcallabah / ubo.md
Last active July 19, 2019 15:01
Ublock Origin filters for twitter feed

block any likes from appearing in your feed

twitter.com##article:has(> div:nth-of-type(1):has(> div:nth-of-type(1):has(> div:nth-of-type(1):has(> svg:has(> g:has(path[d="M12 21.638h-.014C9.403 21.59 1.95 14.856 1.95 8.478c0-3.064 2.525-5.754 5.403-5.754 2.29 0 3.83 1.58 4.646 2.73.814-1.148 2.354-2.73 4.645-2.73 2.88 0 5.404 2.69 5.404 5.755 0 6.376-7.454 13.11-10.037 13.157H12z"]))))))

block "x replied"

twitter.com##article:has(> div:nth-of-type(1):has(> div:nth-of-type(1):has(> div:nth-of-type(1):has(> svg:has(> g:has(path[d="M14.046 2.242l-4.148-.01h-.002c-4.374 0-7.8 3.427-7.8 7.802 0 4.098 3.186 7.206 7.465 7.37v3.828c0 .108.044.286.12.403.142.225.384.347.632.347.138 0 .277-.038.402-.118.264-.168 6.473-4.14 8.088-5.506 1.902-1.61 3.04-3.97 3.043-6.312v-.017c-.006-4.367-3.43-7.787-7.8-7.788z"]))))))
card an unusual wager: look <- only useful when needing coins
https://fallenlondon.fandom.com/wiki/Cave_of_the_Nadir_(Guide)
Poet-Laureate and Paramount Presence.
A few terms as Governor (the highest title is at twelve terms).
Increase your Renown with various factions.
Become Stormy-Eyed.
Increase your Quirks.
@Zazcallabah
Zazcallabah / android-sound-fix
Created November 11, 2019 08:29
disables the nag-notification about high headphone volume on android
adb root
adb pull /system/build.prop
echo "audio.safemedia.bypass=true" >> ./build.prop
adb shell
mount -o rw,remount /system
exit
adb push ./build.prop /system