Skip to content

Instantly share code, notes, and snippets.

View mrwulff's full-sized avatar

Kevin Wulff mrwulff

View GitHub Profile
@akshayaurora
akshayaurora / do_share_ios_kivy.py
Created May 31, 2022 15:27
Kivy Share file on iOS
app = App.get_running_app()
import ios
from pyobjus import autoclass
NSURL = autoclass('NSURL')
UIApplication = autoclass('UIApplication')
sharedApplication = UIApplication.sharedApplication()
def do_share_ios(data, title):
URL = NSURL.fileURLWithPath_(data)
UIActivityViewController = autoclass('UIActivityViewController')
@kengoon
kengoon / datepicker.py
Last active November 22, 2023 08:44
A re-implementation of Adam's kivy widget (https://stackoverflow.com/users/1281548/adam) (https://stackoverflow.com/questions/13714074/kivy-date-picker-widget#) in Material Design using KivyMD
from kivy.event import EventDispatcher
from kivy.metrics import dp
from kivy.properties import ListProperty, StringProperty
from kivymd.uix.behaviors import FakeRectangularElevationBehavior
from kivymd.uix.card import MDCard
from kivy.uix.behaviors import ToggleButtonBehavior
from kivy.uix.gridlayout import GridLayout
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label

In this gist I will explain what are all the steps that I followed in order to generate a signed version of my .aab.

Note: This signing process only works on Ubuntu and only works in a single terminal. YOU MUST COMPLETE ALL THE STEPS IN A SINGLE TERMINAL.DO NOT CLOSE THE TERMINAL IN ANY STEPS IN BETWEEN.

  1. Open any directory in your terminal(I prefer the documents directory).
  2. Now type mkdir -p ~/keystores/. This will create a folder in your home directory witht the name keystore. Keep this folder safe as you need it to update your app later down the line
  3. Now run this command keytool -genkey -v -keystore ~/keystores/<your-new-key>.keystore -alias <your-key-alias> -keyalg RSA -keysize 2048 -validity 10000. Here replace <your-new-key> with the name of your keystore. Replace <your-key-alias> with the name of your key(typically your app name) Set the validity to whatever you want. It represents the number of days your key will be valid. I would recommend setting it to the numbe
@Dirk-Sandberg
Dirk-Sandberg / main.m snippet
Created December 23, 2019 03:18
How to determine if the top notch exists on iOS with python/kivy/pyobjus
@interface NotchDetector : UIViewController
@end
@implementation NotchDetector
-(id)init {
NSLog(@"initializing NotchDetector");
return self;
}
- (BOOL)hasTopNotch {
if (@available(iOS 13.0, *)) {
@Dirk-Sandberg
Dirk-Sandberg / main.kv
Created December 20, 2019 18:55
How to use a native image chooser in iOS - not perfected, just proof of concept.
BoxLayout:
Button:
text: "hello"
on_release:
app.pick_image()
Button:
text: "update"
on_release:
app.update()
@reox
reox / setdatetime.sh
Created August 8, 2016 16:45
Set the Time on a Canon Camera with gphoto2
# This is very simple but I always forget it...
gphoto2 --set-config datetime=$(date +%s)
@Yona-Appletree
Yona-Appletree / ws2811_bridge.ino
Created September 9, 2013 02:56
A simple Arduino program which uses Adafruit's NeoPixel library to relay serial-level RGB data to a series of WS2811-compatible LED modules attached to an output pin. The use of Adafurit's library requires double buffering in the serial-receive code, reducing the number of LEDs that can be driven with a single Arduino. It's possible that code co…
// include the neo pixel library
#include <Adafruit_NeoPixel.h>
// The number of LEDs being driven. This dictates how much data is expected in each frame read from the serial port.
static const int NUM_LEDS = 256;
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_RGB Pixels are wired for RGB bitstream