Skip to content

Instantly share code, notes, and snippets.

View nullpixel's full-sized avatar

nullpixel nullpixel

View GitHub Profile

Keybase proof

I hereby claim:

  • I am nullpixel on github.
  • I am jamiebishop (https://keybase.io/jamiebishop) on keybase.
  • I have a public key ASA_Hqk3OLXHFyT0hVxr_rayZlzsomh90H3PH2Jc32qG4Ao

To claim this, I am signing this object:

@nullpixel
nullpixel / write_memory.c
Last active October 17, 2021 16:12
MSHookMemory wrapper for all modern jailbreaks.
#include <mach/mach.h> // mach_task_self, vm_protect
#include <substrate.h> // MSFindSymbol
// MARK: - Types
typedef void (*MSHookMemory_ptr_t)(void *target, const void *data, size_t size);
#define ENSURE_KERN_SUCCESS(ret) \
if (ret != KERN_SUCCESS) { \

write_memory.c

This is a MSHookFunction shim, which supports writing to RX memory on all modern jailbreaks.

Usage

Requires linking against CydiaSubstrate for MSFindSymbol, but dlsym should work fine, to remove this dependency.

Implementation

@nullpixel
nullpixel / FileDownloader.swift
Created August 22, 2018 19:15
A simple and untested file downloader in swift
import Foundation
class FileDownloader {
// MARK: - Properties
private var outputFolder: URL
private var queueIdentifier: String
private var urlSession: URLSession
// MARK: - Types
@nullpixel
nullpixel / stations.json
Created January 7, 2018 16:21
All current UK train stations, in JSON format with their crs and tiploc codes, and their Easing & Northing. Used in an upcoming app to autocomplete station suggestions.
[{
"name": "Aberdare Rail Station",
"crs": "ABA",
"tiploc": "ABDARE",
"easting": 300400,
"northing": 202800
}, {
"name": "Aberdour Rail Station",
"crs": "AUR",
"tiploc": "ABDO",
@nullpixel
nullpixel / fill.js
Created October 25, 2017 12:35
Fill a canvas.place pixel database with information from an image
const getPixels = require('get-pixels');
const path = require('path');
const mongoose = require("mongoose");
const config = require('../config/config');
const Pixel = require('../models/pixel');
mongoose.connect(config.database).then(() => console.info('Connected to database'));
const batch_size = 1000;
@nullpixel
nullpixel / .zshrc
Last active December 13, 2023 12:05
My zsh configuration & edited dracula theme.
# Path to your oh-my-zsh installation.
export ZSH=/home/null/.oh-my-zsh
# -------------------------------------------------------------------
# General ZSH config
# -------------------------------------------------------------------
ZSH_THEME="dracula"
plugins=(git)
@nullpixel
nullpixel / Using Git to Manage a Live Web Site.md
Last active July 15, 2017 09:49 — forked from Nilpo/Using Git to Manage a Live Web Site.md
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

Keybase proof

I hereby claim:

  • I am nullpixel on github.
  • I am nullpixel (https://keybase.io/nullpixel) on keybase.
  • I have a public key ASCmc9LNJf1rpn_QJD2ZgNxn0kCWS3HxQz6HsPkhzvziCAo

To claim this, I am signing this object: