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
| const { getDefaultConfig } = require('expo/metro-config'); | |
| /** @type {import('expo/metro-config').MetroConfig} */ | |
| const config = getDefaultConfig(__dirname); | |
| // Keep your custom source extension if needed | |
| if (config.resolver.sourceExts && !config.resolver.sourceExts.includes('sql')) { | |
| config.resolver.sourceExts.push('sql'); | |
| } |
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
| // translations+interpolations.ts | |
| function defineTranslations< | |
| T extends Record<string, Record<string, string>> | |
| >(t: T & Record<keyof T, Record<keyof T[keyof T], string>>) { | |
| return t; | |
| } | |
| export const translations = defineTranslations({ | |
| en: { | |
| hello: "Hello", |
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
| document.addEventListener("DOMContentLoaded", function() { | |
| var links = document.querySelectorAll('a'); | |
| for (var i = 0; i < links.length; i++) { | |
| var link = links[i]; | |
| if (link.href.indexOf('http://andrija-vranic.from.hr') === 0) { | |
| link.href = link.href.replace('http://', 'https://'); | |
| } | |
| } | |
| }); |
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 { useCallback, useState } from 'react'; | |
| import * as SQLite from 'expo-sqlite'; | |
| import { | |
| FlatList, | |
| Platform, | |
| StyleSheet, | |
| Text, | |
| TextInput, | |
| TouchableOpacity, | |
| } from 'react-native'; |
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 | |
| import filetype | |
| class SimpleThumbnailer(ThumbnailGenerator): | |
| IMAGES = ( | |
| 'png', 'jpg', 'jpeg', 'jpe', 'gif', 'bmp', 'dib', 'dcx', | |
| 'eps', 'ps', 'im', 'pcd', 'pcx', 'pbm', 'pbm', 'ppm', | |
| 'psd', 'tif', 'tiff', 'xbm', 'xpm', | |
| ) | |
| def make_thumbnail(self, inputfile_path, outputfile_path, **kwargs): |
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
| //https://gist.github.com/rclark/6908938?permalink_comment_id=4749563#gistcomment-4749563 | |
| // with thumbs | |
| showGetFeatureInfo: function ( | |
| err, | |
| latlng, | |
| content | |
| // signaturaFromUrl | |
| ) { | |
| if (err) { |