Skip to content

Instantly share code, notes, and snippets.

@wmerrifield
wmerrifield / build+archive.sh
Created November 8, 2010 17:53
A shell script to perform the equivalent of Xcode's "Build & Archive" command.
#!/bin/sh
#
# Copyright (c) 2010 Warren Merrifield
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@3096
3096 / crcfix.py
Last active September 24, 2018 02:12
Fix Splatoon 2 save file CRC in the header (for plaintext body)
import zlib
import struct
import os
import sys
DEFAULT_FILENAME = "save.dat"
def fixcrc(fileName):
HEADER_SIZE = 0x10
FOOTER_SIZE = 0x30
@snej
snej / QRCode.m
Created September 21, 2015 16:48
Shows how to generate a QRCode on iOS or Mac OS X
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
typedef UIImage QRImage;
#else
#import <AppKit/AppKit.h>
typedef NSImage QRImage;
#endif
+ (QRImage*) QRCodeImageWithData: (NSData*)data size: (CGFloat)size {
@mseeley
mseeley / PlayStation 4.xml
Last active July 13, 2020 12:29
Work in progress Plex DLNA profile for the PlayStation 4 Media Player
<?xml version="1.0" encoding="UTF-8"?>
<Client name="PlayStation 4">
<!-- Author: Plex Inc. -->
<!-- http://blog.us.playstation.com/2015/06/15/media-player-coming-to-ps4/ -->
<Identification>
<Header name="User-Agent" substring="PlayStation 4" />
<Header name="User-Agent" substring="UPnP/1.0 DLNADOC/1.50" />
</Identification>
<TranscodeTargets>
@qingxp9
qingxp9 / yatebts-gcc6-gcc7.patch
Created November 6, 2018 03:39
yatebts-gcc6-gcc7.patch
#This patch works for gcc6, gcc7, and is from http://yate.null.ro/mantis/view.php?id=416
--- a/mbts/GPRS/MSInfo.cpp
+++ b/mbts/GPRS/MSInfo.cpp
@@ -638,7 +638,7 @@
if (msPCHDowns.size() > 1) {
std::ostringstream os;
msDumpChannels(os);
- GPRSLOG(INFO,GPRS_MSG|GPRS_CHECK_OK) << "Multislot assignment for "<<this<<os;
+ GPRSLOG(INFO,GPRS_MSG|GPRS_CHECK_OK) << "Multislot assignment for "<<this<<(!os.fail());
}
@vilhalmer
vilhalmer / gist:3052f7e9e7f34b92a40f
Created November 1, 2014 01:28
NSVisualEffectView undocumentation
NSVisualEffectMaterial constants, and the undocumented materials they coorespond to in various modes:
+----------------------+-------+----------+------+---------+
| MATERIAL # | LIGHT | LIGHT EM | DARK | DARK EM |
+----------------------+-------+----------+------+---------+
| | | | | |
| 0 - Appearance Based | 3 | 3 | 5 | 5 |
| | | | | |
| 1 - Light | 3 | 3 | 3 | 3 |
| | | | | |
| 2 - Dark | 4 | 4 | 4 | 4 |
@TheExpertNoob
TheExpertNoob / Extract encrypted titlekey from NAND dump
Last active September 25, 2022 02:24
Get Encrypted title keys from NAND Dump
Decrypt with the only key needed to obtain your titlekeys.
ddffd9e6c550750b187ba5c09e669d40db5d031964cd63455d78d73ba24ae62b
Gathered from info from http://switchbrew.org/index.php?title=Ticket
1) dump your nand with linux
2) open NAND dump with HACDISKMOUNT
3) extract/dump PRODINFO partition with BIS0 key
4) mount SYSTEM (with BIS2 keys) and copy Save/80000000000000e2 to your physical harddrive
@xem
xem / gist:670dec8e70815842eb95
Last active January 19, 2023 22:43
beep boop
<!-- solution 1, 117b, inspired by http://www.p01.org/releases/140bytes_music_softSynth/ -->
<button onclick="new Audio('data:audio/wav;base64,UklGRl9vT19XQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YU'+Array(1e3).join(123)).play()">Beep</button>
<!-- Solution 2, 107b, inspired by http://xem.github.io/chip8/c8.html -->
<button onclick="o=(A=new AudioContext()).createOscillator();o.connect(A.destination);o.start(0);setTimeout('o.stop(0)',500)">Boop</button>
@0xced
0xced / XCDFakeCarrier.m
Last active March 5, 2023 22:07
Hack to choose the displayed carrier name in the iOS simulator
//
// Copyright (c) 2012-2015 Cédric Luthi / @0xced. All rights reserved.
//
#import <Foundation/Foundation.h>
#if TARGET_OS_SIMULATOR
static const char *fakeCarrier;
static const char *fakeTime;
@Reisyukaku
Reisyukaku / DumpSave.js
Last active May 11, 2023 16:38
Game save dumper
var tid = '0000000000000000'; //Set appropriate game TID; Need to find a way to get TID automatically...
utils.log("stage1, hijack fsppr and set perms");
sc.getFSPPR();
sc.ipcMsg(1).sendPid().data(0).sendTo('fsp-srv').assertOk();
var pid = sc.read4(sc.ipcBufAddr, 0xC >> 2);
utils.log('Got process PID: '+pid.toString(16));
var buf1_sz = 0x1C;