This file contains hidden or 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
| #!/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 |
This file contains hidden or 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
| 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 - |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| #!/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) |
This file contains hidden or 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
| 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; |
This file contains hidden or 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
| #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 |
This file contains hidden or 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
| #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; |
This file contains hidden or 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
| #!/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 | |
| # ¯\_(ツ)_/¯ |
This file contains hidden or 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
| 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. |