Skip to content

Instantly share code, notes, and snippets.

View OothecaPickle's full-sized avatar

OothecaPickle

View GitHub Profile
@qffdn
qffdn / mpkdec.c
Created July 15, 2017 06:11
Microsoft/Windows product key decoder
/*
* Copyright (c) 2017 Donald Smith <[email protected]>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@leodutra
leodutra / boot-setup.md
Created March 8, 2017 13:47
Bios boot type on GPT vs MBR boot flag
  • Legacy BIOS bootable attribute -- This is the official name of the relevant feature, as described in the UEFI specification (version 2.3.1, p. 105, Table 19). It's set by setting the "legacy_boot flag" in parted or its relatives, or by setting attribute bit #2 using the "a" option on the experts' menu in gdisk. (The wiki to which you linked describes doing this with sgdisk.) It's used by SYSLINUX's GPT support to identify a partition that holds second-stage boot code.
  • The "boot flag" on MBR disks -- On MBR disks, the "boot flag" is a bit that can be set using either fdisk or parted. It's analogous to the GPT legacy BIOS bootable attribute, since it serves the same purpose. Note that on a GPT disk, it's possible (although technically a violation of the spec) to set this flag on the protective 0xEE partition. You can do this with fdisk, but not with parted, since the latter lacks a user interface to do anything explicit with the protective 0xEE MBR partition. (This is reportedly changing with in-development
@matteyeux
matteyeux / ios_dcsd_output_set.c
Last active August 29, 2019 02:40 — forked from alexhude/ios_dcsd_output_set.c
Setting up /dev/uart.debug-console output for DCSD
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/file.h>
#include <assert.h>
#include <fcntl.h>
#include <errno.h>
#include <termios.h>
#include <unistd.h>
#include <sys/event.h>
@scottopell
scottopell / fix_exfat_drive.md
Last active April 28, 2025 01:04
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

If Disk Utility is unable to repair, consider trying this:

  1. In Disk Utility, ensure that the drive is not mounted, eject it if it is mounted.
  2. Use diskutil list to find the right drive id.
  3. You want the id under the IDENTIFIER column, it should look like disk1s1
  4. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  5. -d is debug so you'll see all your files output as they're processed.
@alexhude
alexhude / ios_dcsd_output_set.c
Created December 24, 2016 04:01
Setting up /dev/uart.debug-console output for DCSD
struct termios tty;
memset (&tty, 0, sizeof tty);
if (tcgetattr (serial_fd, &tty) != 0)
return -1;
// set speed
cfsetospeed (&tty, B115200);
// set control options
@joaoBeno
joaoBeno / gist:c4730205580569ab1102db42392b05eb
Created May 21, 2016 10:08
How to circumvent slow as hell Mac App Store dowload...
So, you have a somewhat fast connection, but Apple decided you should have the latest Os X (Or some other app) in 3 days?
Let's change that!
The idea is simply to get the Apple download URL, download the file using some download accelerator, then fake the server on localhost
so App Store download it from your computer instead of the internet!
So, now the instructions (That I found over here: https://7labs.heypub.com/tips-tricks/el-capitan-direct-download.html):
1) Open App Store, then go to the app you wish to download, let the screen there and open a terminal window
2) Type the command below to open your computer's host files (This files store a sort of list relating ip's to domains)
sudo nano /etc/hosts
source :
https://7labs.heypub.com/tips-tricks/el-capitan-direct-download.html
1. cd Desktop
2. mkdir osxapps_local
3. cd osxapps_local
@nuomi1
nuomi1 / PrintBootCampESDInfo.swift
Last active May 7, 2025 21:36
macOS and BootCamp Latest
#!/usr/bin/env swift
//
// PrintBootCampESDInfo.swift
//
// Created by nuomi1 on 8/5/18.
// Copyright © 2018年 nuomi1. All rights reserved.
//
import Foundation
@rahul286
rahul286 / mac-osx-el-captain-commands.sh
Last active September 24, 2024 03:11
Updating to Mac elCapitan using downloaded pkg file
## based on https://github.com/lioonline/OS-X-El-Capitan
## pkg file link - http://osxapps.itunes.apple.com/apple-assets-us-std-000001/Purple3/v4/74/d2/82/74d28291-9db9-7ae2-305d-9b8b3f5fd463/ftk3252456602304584541.pkg
# Run this from folder where you have downloaded or copied ftk3252456602304584541.pkg file
#create a tmp folder
mkdir elCapitanRoot && cd elCapitanRoot
#create a folder structure to match apple server
sudo mkdir -p ./apple-assets-us-std-000001/Purple3/v4/74/d2/82/74d28291-9db9-7ae2-305d-9b8b3f5fd463/