This file contains 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 | |
KEYNAME=$1 | |
KEYPASS=$2 | |
function generate_keys() { | |
# Make keystores directory if it doesn't exist | |
if [ ! -d ~/keystores ]; then | |
mkdir ~/keystores | |
fi |
This file contains 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 sys | |
ANDROID_TARGET_API = '28' | |
ARCH = sys.argv[1] | |
with open("buildozer.spec", "r") as f: | |
text = f.readlines() | |
for i, line in enumerate(text): | |
if 'android.api' in line: | |
# Set the minimum target API as required by Google | |
text[i] = 'android.api = ' + ANDROID_TARGET_API + "\n" |
This file contains 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
@interface NotchDetector : UIViewController | |
@end | |
@implementation NotchDetector | |
-(id)init { | |
NSLog(@"initializing NotchDetector"); | |
return self; | |
} | |
- (BOOL)hasTopNotch { | |
if (@available(iOS 13.0, *)) { |
This file contains 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
BoxLayout: | |
Button: | |
text: "hello" | |
on_release: | |
app.pick_image() | |
Button: | |
text: "update" | |
on_release: | |
app.update() |
This file contains 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
# Files are below, this is just to change the name of the gist |
This file contains 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 os.path import join, dirname, realpath, exists, isdir, basename, dirname, abspath | |
from os import listdir, unlink, makedirs, environ, chdir, getcwd, walk, remove | |
def remove_junk(d): | |
exts = [".so.o"] | |
for root, dirnames, filenames in walk(d): | |
for fn in filenames: | |
if any([fn.endswith(ext) for ext in exts]): | |
print("Removing", join(root,fn)) | |
unlink(join(root, fn)) |
This file contains 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 kivy.app import App | |
from kivy.lang import Builder | |
from kivy.clock import Clock | |
from kivy.animation import Animation | |
from kivy.garden.mapview import MapView | |
print("A") | |
# Animate moving around on a map | |
kv = """ | |
FloatLayout: |
This file contains 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 kivy.app import App | |
from kivy.lang import Builder | |
from kivy.clock import Clock | |
from kivy.animation import Animation | |
# Expands an element in a grid and adds a widget to it/ | |
kv = """ | |
<AnimatedListTile@FloatLayout>: | |
canvas.before: | |
Color: |
This file contains 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 kivy.app import App | |
from kivy.lang import Builder | |
from kivy.clock import Clock | |
from kivy.animation import Animation | |
# Loads an image from the web, changes it's color and angle. | |
kv = """ | |
<AnimatedImage@AsyncImage>: | |
color: (1,1,1,1) # Setting color for images works best on white images | |
color2: (1,0,0,1) |
This file contains 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 kivy.app import App | |
from kivy.lang import Builder | |
from kivy.clock import Clock | |
from kivy.animation import Animation | |
# Makes a widget bounce around the screen | |
kv = """ | |
<AnimatedMenu@GridLayout>: | |
cols: 2 | |
spacing: 10, |
NewerOlder