Skip to content

Instantly share code, notes, and snippets.

View moechofe's full-sized avatar
🔴

martin mauchauffée moechofe

🔴
  • Paris, France
View GitHub Profile
@1995eaton
1995eaton / mt.h
Created October 17, 2015 23:57
Mersenne Twister (32 and 64 bit) C89+ header
#ifndef MT_H
#define MT_H
#define MT_GEN(TYPE, NAME, W, N, M, A, U, D, S, B, T, C, F, L, LM, UM) \
typedef struct { \
TYPE MT[N]; \
TYPE index; \
} NAME; \
void NAME##_seed(NAME *mt, TYPE seed) { \
mt->index = (N); \
@tkrotoff
tkrotoff / RemoveWin10DefaultApps.ps1
Last active February 18, 2025 12:10
Remove Windows 10 default apps
# See Remove default Apps from Windows 10 https://thomas.vanhoutte.be/miniblog/delete-windows-10-apps/
# See Debloat Windows 10 https://github.com/W4RH4WK/Debloat-Windows-10
# Command line to list all packages: Get-AppxPackage -AllUsers | Select Name, PackageFullName
Get-AppxPackage Microsoft.Windows.ParentalControls | Remove-AppxPackage
Get-AppxPackage Windows.ContactSupport | Remove-AppxPackage
Get-AppxPackage Microsoft.Xbox* | Remove-AppxPackage
Get-AppxPackage microsoft.windowscommunicationsapps | Remove-AppxPackage # Mail and Calendar
#Get-AppxPackage Microsoft.Windows.Photos | Remove-AppxPackage
Get-AppxPackage Microsoft.WindowsCamera | Remove-AppxPackage
@paniq
paniq / pico8.txt
Last active October 5, 2024 06:12
PICO-8 hacks & secrets
Screen resolutions
------------------
PICO-8 supports different undocumented videomodes that can be activated at runtime,
using poke(0x5F2C, X) where X is one of the following mode numbers:
0: 128x128, 0 pages
1: 64x128, 1 page
2: 128x64, 1 page
3: 64x64, 3 pages
@ByteProject
ByteProject / amigaffs_ubuntu.sh
Last active March 14, 2021 12:54
How to r/w Amiga FFS media in Ubuntu Linux
# HOW TO MOUNT AMIGA FFS MEDIA IN UBUNTU LINUX
# Linux comes with built-in support for Amiga FastFileSystem (AFFS).
# First we need to create a directory for mounting the partition.
sudo mkdir /media/AmigaMount
# Fire up fdisk to check the device name.
sudo fdisk -l
# My device is /dev/sdb. Using parted.
@omz
omz / Dropbox File Picker.py
Last active February 20, 2025 09:40
Dropbox File Picker.py
# IMPORTANT SETUP INSTRUCTIONS:
#
# 1. Go to http://www.dropbox.com/developers/apps (log in if necessary)
# 2. Select "Create App"
# 3. Select the following settings:
# * "Dropbox API app"
# * "Files and datastores"
# * "(No) My app needs access to files already on Dropbox"
# * "All file types"
# * (Choose any app name)
@NathanFlurry
NathanFlurry / ExampleCode.lua
Created May 24, 2014 18:10
You also need to have https://github.com/Zoyt/EasyiAP included in your project.
-- In setup
iapItems = {}
registerItem("itemIDOne")
registerItem("itemIDTwo")
initStore()
storeReady = false
purchasePending = false
-- Purchasing the item
purchaseItem(itemNum) -- Number of the item registered in order; i.e. 0 would be 'itemIDOne' and 1 would be 'itemIDTwo'
@mseeley
mseeley / webworker-preloader.html
Created March 3, 2014 09:29
WebWorker Image preloader proof of concept (Tested in Mobile Safari 6.0/IOS 6.1.3 and Chrome 33)
<!DOCTYPE html>
<html>
<head>
<title>WebWorker image preloading</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
</head>
<body>
<div id="output"></div>
<script id="imgloader" type="javascript/worker">
// Not race proof or robust. Proof of concept.
@brookesi
brookesi / gist:6593116
Last active July 19, 2017 07:27
Jumper Pathfinding Library for Codea Users
--[[
Ported 17th September 2013 by Simon Brooke
Original code: https://github.com/Yonaba/Jumper
*** Copyright notice below must not be removed ***
Porting notes:
- All modules have been scrunched into the one file under
a Jumper namespace, see example at end
@dermotbalson
dermotbalson / gist:6508514
Last active December 22, 2015 17:49
Template
--# Notes
--[[
This is a template for creating multi-tab projects
That is, projects where each tab can be run independently
This can be used for step by step tutorials, with users able to choose which tab runs
It can also be used for multi-stage projects, eg games where there are several stages like
* start menu
* play (maybe with multiple levels)
@briarfox
briarfox / Main.lua
Last active January 14, 2016 22:48
AutoGist AutoInstall
--AutoGist Single Install
--Installer created by @Briarfox
--- This will pull the AutoGist project into Codea for you
-- Instructions:
-- * Create a new project in Codea named AutoGist.
--This is case sensitive
ProjectName = "AutoGist"
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters)
-- * Make sure there is a single tab in the project
-- * Run and wait for success!