Skip to content

Instantly share code, notes, and snippets.

View tomdwipo's full-sized avatar

T~ tomdwipo

View GitHub Profile
@tomdwipo
tomdwipo / embedded-file-viewer.md
Created October 31, 2025 08:04 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@tomdwipo
tomdwipo / FirebaseLoggingCallback.swift
Created June 30, 2025 05:10
logging analytics on kmm (kotlin multi platform)
import FirebaseAnalytics
/**
* `FirebaseLoggingCallback` is an iOS-specific implementation of `FirebaseIosCallback`
* from the shared module. It provides functionality to log events to Firebase Analytics.
*/
class FirebaseLoggingCallback: FirebaseIosCallback {
/**
* Logs a Firebase event with the given event ID and parameters.
@tomdwipo
tomdwipo / androidMainEncryptionHelper.kt
Created June 30, 2025 04:53
Kotlin Multiplatform (KMP) Encryption Helper: Provides cross-platform encryption and decryption utilities with common, Android-specific, and iOS-specific implementations.
import javax.crypto.Cipher
import javax.crypto.spec.IvParameterSpec
import javax.crypto.spec.SecretKeySpec
/**
* Actual Android implementation of the encryption function.
* Encrypts the given plaintext using AES algorithm with the provided key and IV.
*
* @param plaintext The data to encrypt as a ByteArray.
extension UIHostingController {
convenience public init(rootView: Content, ignoreSafeArea: Bool) {
self.init(rootView: rootView)
if ignoreSafeArea {
disableSafeArea()
}
}
func disableSafeArea() {
@tomdwipo
tomdwipo / FontNames-iOS12.swift
Created March 4, 2019 14:11 — forked from tadija/FontNames-iOS-17.4.swift
iOS - All Font Names
/*
*** Academy Engraved LET ***
AcademyEngravedLetPlain
---------------------
*** Al Nile ***
AlNile
AlNile-Bold
---------------------
*** American Typewriter ***
AmericanTypewriter
@tomdwipo
tomdwipo / README-Template.md
Created April 23, 2017 16:33 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@tomdwipo
tomdwipo / genetic.py
Created May 17, 2016 10:41 — forked from bellbind/genetic.py
[python]Genetic Algorithm example
"""Genetic Algorithmn Implementation
see:
http://www.obitko.com/tutorials/genetic-algorithms/ga-basic-description.php
"""
import random
class GeneticAlgorithm(object):
def __init__(self, genetics):
self.genetics = genetics
pass
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>