From | To | Expression |
---|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download latest archlinux bootstrap package, see https://www.archlinux.org/download/ | |
wget 'ftp://ftp.nluug.nl/pub/os/Linux/distr/archlinux/iso/latest/archlinux-bootstrap-*-x86_64.tar.gz' | |
# Make sure you'll have enough entropy for pacman-key later. | |
apt-get install haveged | |
# Install the arch bootstrap image in a tmpfs. | |
mount -t tmpfs none /mnt | |
cd /mnt | |
tar xvf ~/archlinux-bootstrap-*-x86_64.tar.gz --strip-components=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef H_SDLSIMPLE | |
#define H_SDLSIMPLE | |
#include <SDL2/SDL.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
// defines | |
typedef struct sdlsimple_events_t { | |
bool quit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(generic_associated_types)] | |
#[allow(dead_code)] | |
trait Functor { | |
type Unwrapped; | |
type Wrapped<B>: Functor; | |
fn map<F, B>(self, f: F) -> Self::Wrapped<B> | |
where | |
F: FnMut(Self::Unwrapped) -> B; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This is going to be on Hackage soon! https://github.com/gatlin/surely | |
{-# LANGUAGE BangPatterns #-} | |
-- | | |
-- Module : AI.Surely | |
-- Copyright : 2012 Gatlin Johnson | |
-- License : LGPL 3.0 | |
-- Maintainer : rokenrol@gmail.com | |
-- Stability : experimental |
So you want to decrypt switch content ? Well, the good news is that all the tools required to do that are written up! The great news is, since this is crypto we're talking about, you'll have to find the keys. Yourself. Like it's easter.
So here you can find a template of the $HOME/.switch/prod.keys
file that hactool uses to decrypt content. It contains all the SHA256 and location of the keys and seeds, so you can find them yourselves.
Note that all the seeds (the keys that end with _source
) are used along with the master_key_##
to derive an actual key.
If you have somehow obtained the key without the seed, you can rename xxx_source
to xxx_##
(where ## is the master key number) and put your key there.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127.0.0.1 ocsp-lb.apple.com.akadns.net | |
127.0.0.1 ocsp-cn-lb.apple.com.akadns.net | |
127.0.0.1 ocsp.apple.com.download.ks-cdn.com | |
127.0.0.1 k128-mzstatic.gslb.ksyuncdn.com | |
127.0.0.1 ocsp.apple.com.cdn20.com | |
127.0.0.1 ocsp.g.aaplimg.com | |
127.0.0.1 ocsp.apple.com | |
127.0.0.1 ocsp.digicert.com |
Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
Consumer key: CjulERsDeqhhjSme66ECg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fixes extremely slow apropos command on macos | |
# Using `apropos` on macos rebuilds the whatis database every time. | |
# Fish shell uses apropos for command completion. | |
# Simply add the file below to `~/.config/fish/conf.d` to fix the issue | |
set db ~/.whatis.db | |
function apropos_update | |
echo "Updating apropos / whatis database at $db" | |
man --path | tr ":" " " | xargs /usr/libexec/makewhatis -o $db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Inspired by: | |
http://eli.thegreenplace.net/2009/08/29/co-routines-as-an-alternative-to-state-machines/ | |
""" | |
def parse_args(target): | |
"""A generator that parses a stream of arguments one character at a time. | |
As soon as a flag, or flag value pair ("-a" or "-a value") is processed | |
the pair is sent off as a tuple to the 'target' generator. |