Skip to content

Instantly share code, notes, and snippets.

View r1cebank's full-sized avatar
🎯
Focusing on rust

Siyuan Gao r1cebank

🎯
Focusing on rust
View GitHub Profile
@iGlitch
iGlitch / switch.md
Created September 25, 2017 07:25
Nintendo Switch Homebrew Compilation Tutorial

Notice: The below instructions were written on 9/22/17 and refer to an alpha build of devkitA64, libnx, and Mephisto. Take it with a grain of salt if the date has moved too far into the future since then.

Using libnx and compiling your first homebrew app for the Nintendo Switch

Requirements

#!/usr/bin/env python3
"""
Python 3 code that can decompress (to a .gvas file), or recompress (to a .savegame file)
the UE4 savegame file that Astroneer uses.
Though I wrote this for tinkering with Astroneer games saves, it's probably
generic to the Unreal Engine 4 compressed saved game format.
Examples:
@davimacedo
davimacedo / curl.sh
Last active June 23, 2021 21:33
Example of importing data with cloud functions. See a live example at https://www.back4app.com/database/davimacedo/parse-import-example
curl -X POST \
-H "X-Parse-Application-Id: LL9oIdzIkmwl5xyowQQu0fTmXyUWfet9RuAzwHfj" \
-H "X-Parse-REST-API-Key: R3S8PYQKuzeV4c8MUeO5ved46C50MEp56boDHW1O" \
-H "Content-Type: application/json" \
-d @data.json \
https://parseapi.back4app.com/functions/import
@jmreidy
jmreidy / test_mocha.opts
Last active January 9, 2018 11:49
Unit test React Native with Mocha
--compilers js:./test/support/compiler
--require ./test/support/init
@satmandu
satmandu / mavericks make iso v1
Last active March 24, 2020 18:36
Quick and Dirty make OS X Mavericks ISO on desktop. Note that you're going to have to enter your password for the sudo commands.
hdiutil attach /Applications/Install\ OS\ X\ Mavericks.app/Contents/SharedSupport/InstallESD.dmg
cd /tmp
hdiutil convert /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg -format UDRW -o /tmp/RWBase
hdiutil convert -format UDSP -o /tmp/sparseRWBase RWBase.dmg
rm /tmp/RWBase.dmg
hdiutil resize -size 6g /tmp/sparseRWBase.sparseimage
hdiutil attach -owners on /tmp/sparseRWBase.sparseimage -shadow
sudo rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
sudo ditto /Volumes/OS\ X\ Install\ ESD/Packages /Volumes/OS\ X\ Base\ System/System/Installation/Packages
hdiutil eject /Volumes/OS\ X\ Install\ ESD/
@dAnjou
dAnjou / flask-upload
Created June 5, 2012 12:35
Flask upload example
<VirtualHost *>
ServerName example.com
WSGIDaemonProcess www user=max group=max threads=5
WSGIScriptAlias / /home/max/Projekte/flask-upload/flask-upload.wsgi
<Directory /home/max/Projekte/flask-upload>
WSGIProcessGroup www
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
@unscriptable
unscriptable / tiny Promise.js
Created February 7, 2011 06:02
A minimalist implementation of a javascript promise
// (c) copyright unscriptable.com / John Hann
// License MIT
// For more robust promises, see https://github.com/briancavalier/when.js.
function Promise () {
this._thens = [];
}
Promise.prototype = {