Skip to content

Instantly share code, notes, and snippets.

View MSylvia's full-sized avatar
💭
Compiling ....

Matt Sylvia MSylvia

💭
Compiling ....
View GitHub Profile
@MSylvia
MSylvia / osx_bootable_iso.sh
Created March 6, 2018 21:17 — forked from un33k/osx_bootable_iso.sh
Create bootable OSX ISO
#!/bin/bash
# Use with care ...
# -----------------------------------------
# Mountain Lion, Mavericks, Yosemite ..
OS=Yosemite
# Mount the installer image
hdiutil attach /Applications/Install\ OS\ X\ "$OS".app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
@MSylvia
MSylvia / gifextract.py
Created April 17, 2018 14:36 — forked from BigglesZX/gifextract.py
Extract frames from an animated GIF, correctly handling palettes and frame update modes
import os
from PIL import Image
'''
I searched high and low for solutions to the "extract animated GIF frames in Python"
problem, and after much trial and error came up with the following solution based
on several partial examples around the web (mostly Stack Overflow).
There are two pitfalls that aren't often mentioned when dealing with animated GIFs -
@MSylvia
MSylvia / resize_gif.py
Created April 17, 2018 14:37 — forked from plallin/resize_gif.py
Extract frames from an animated GIF, correctly handling palettes and frame update modes
from PIL import Image
'''
Based on a script by BigglesZX: https://gist.github.com/BigglesZX/4016539
BigglesZX was adapted as follows:
- Updated to be compatible with Python 3.
- The original function 'processImage' was renamed 'extract_and_resize_frames' and was adapted as follows:
- It resizes each frames as it extracts them
- It saves all the frames to an array
@MSylvia
MSylvia / createmyguest.sh
Created April 27, 2018 13:51
check Rich's updated version of this at https://gist.github.com/rtrouton/8016797
#!/bin/bash
#variables
DSCL="/usr/bin/dscl"
SECURITY="/usr/bin/security"
LOGGER="/usr/bin/logger"
OSREL=`/usr/bin/uname -r | cut -f 1 -d '.'`;
case "${OSREL}" in
10)
@MSylvia
MSylvia / Game1.cs
Created January 8, 2019 15:28 — forked from moolicc/Game1.cs
MonoGame backend sample for ImGui.NET (https://github.com/mellinoe/ImGui.NET)
using System;
using System.Runtime.InteropServices;
using ImGuiNET;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using Vector2 = ImGuiNET.Vector2;
using Vector3 = ImGuiNET.Vector3;
using Vector4 = ImGuiNET.Vector4;
@MSylvia
MSylvia / generate.c
Created March 5, 2019 14:33 — forked from munificent/generate.c
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
#include <stdio.h>
#include <stdlib.h>
const int H = 40;
const int W = 80;
char map[H][W];
int rnd(int max) {
return rand() % max;
@MSylvia
MSylvia / forcefully_remove_mdm_1013.sh
Created March 12, 2019 14:40 — forked from opragel/forcefully_remove_mdm_1015.sh
forcefully_remove_mdm_1013.sh
#!/bin/bash
# Seriously there still apparently aren't enough warning labels
# If you don't understand the consequences don't do it
# ################
# #### May cause 10.13.2+ machines that were DEP-enrolled to not be considered as such
# ################
# but really, you shouldn't do this
# one local user enabled for MDM come on apple
# ¯\_(ツ)_/¯
@MSylvia
MSylvia / startosinstall_10.12.6_normalboot.txt
Created March 12, 2019 14:41 — forked from gregneagle/startosinstall_10.12.6_normalboot.txt
Comparison of startosinstall's available options depending on boot OS environment
bash-3.2$ /Applications/Install\ macOS\ Sierra.app/Contents/Resources/startosinstall --usage
Usage: startosinstall --applicationpath <install macOS.app path>
Arguments
--applicationpath, a path to copy of the OS installer application to start the install with.
--license, prints the user license agreement only.
--agreetolicense, agree to license the license you printed with --license.
--rebootdelay, how long to delay the reboot at the end of preparing. This delay is in seconds and has a maximum of 300 (5 minutes).
--pidtosignal, Specify a PID to which to send SIGUSR1 upon completion of the prepare phase. To bypass "rebootdelay" send SIGUSR1 back to startosinstall.
--usage, prints this message.