Skip to content

Instantly share code, notes, and snippets.

View mekanics's full-sized avatar

Alexandre Joly mekanics

View GitHub Profile
@mekanics
mekanics / gist:351c70a47ca61c3507a2aefceaa13d01
Created November 27, 2023 16:55 — forked from levelsio/gist:5bc87fd1b1ffbf4a705047bebd9b4790
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same!
Send me your ChatGPT text adventure game on X, I'd love to try it!
@mekanics
mekanics / nvmCommands.js
Created November 22, 2021 09:46 — forked from chranderson/nvmCommands.js
Useful NVM commands
// check version
node -v || node --version
// list installed versions of node (via nvm)
nvm ls
// install specific version of node
nvm install 6.9.2
// set default version of node
@mekanics
mekanics / google_classroom_classwork_download.js
Last active October 21, 2021 12:45
Download all the files from your Google Classroom
/**
* HOW TO
*
* 1. go to the classwork (open the classroom > classwork)
* 2. open developer console ( F12 or right click > inspect element > console in top)
* 3. copy and paste this code, assignments will be downloaded in 1 second intervals. A list of the documents outside Google Drive will be available at the end
*/
const listItemClass = '.jWCzBe'
const materialClass = '.vwNuXe'
@mekanics
mekanics / Covid19VaccinationSwitzerland.js
Last active June 18, 2021 17:17
COVID-19 Vaccination predication in Switzerland – Widget Raw
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: red; icon-glyph: plus-square;
/**
* @akosma wrote this nice little script (in python) to try to figure out when the
* Swiss population would be fully vaccinated (with both doses of
* the COVID-19 vaccination). The script would print out the result to the
* console. This is the JS version, which displays the result in a widget.
*
@mekanics
mekanics / career-list.css
Last active November 21, 2016 15:05
EBP - Job HTML
.career-list {
background-color: transparent;
}
.career-list .career-list__item {
color: #333;
}
.career-list__item {
padding: 12px;
@mekanics
mekanics / Localizable.strings
Created July 26, 2016 12:47
Localizing Plurals in Swift
// the strings without format can be included here
"foo" = "bar";
func keyboardWillChangeFrame(notification: NSNotification) {
// Add this in to your code:
// NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(keyboardWillChangeFrame), name: UIKeyboardWillChangeFrameNotification, object: nil)
let keyboardFrame = notification.userInfo![UIKeyboardFrameEndUserInfoKey]!.CGRectValue
// Do something with it
}
@mekanics
mekanics / 01_setup.sh
Last active August 29, 2015 14:22
Push your app to iTunesConnect. also useful for CI jobs...
#!/bin/bash
ln -s "/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool" /usr/local/bin/altool
ln -s "/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms" /usr/local/bin/itms #itms is needed, otherwise altool will not work correctly
@mekanics
mekanics / code_signing.not_required.sh
Created June 1, 2015 08:50
Resetting the flag to be able to generate an unsigned IPA iOS application. Because doing that manually after each Xcode update sucks.
#!/bin/bash
sdkFolder="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/"
sdkPlist="SDKSettings.plist"
cp ${sdkFolder}${sdkPlist} . && \
/usr/libexec/PlistBuddy -c "Set DefaultProperties:CODE_SIGNING_REQUIRED NO" ./${sdkPlist} && \
sudo mv ${sdkPlist} ${sdkFolder}
//
// AMScanViewController.h
//
//
// Created by Alexander Mack on 11.10.13.
// Copyright (c) 2013 ama-dev.com. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>