Skip to content

Instantly share code, notes, and snippets.

View aidino's full-sized avatar

Dino aidino

  • 20:02 (UTC +07:00)
View GitHub Profile
@aidino
aidino / gs_model_list_1_0_0.json
Last active October 23, 2025 06:30
remove prompt lab
{
"models": [
{
"name": "Gemma-3n-E2B-it",
"modelId": "google/gemma-3n-E2B-it-litert-lm",
"modelFile": "gemma-3n-E2B-it-int4.litertlm",
"description": "Preview version of [Gemma 3n E2B](https://ai.google.dev/gemma/docs/gemma-3n) ready for deployment on Android using the [MediaPipe LLM Inference API](https://ai.google.dev/edge/mediapipe/solutions/genai/llm_inference). The current checkpoint supports text, vision, and audio input, with 4096 context length.",
"sizeInBytes": 3388604416,
"minDeviceMemoryInGb": 8,
"commitHash": "73b019b63436d346f68dd9c1dbfd117eb264d888",
import UIKit
import FBSDKLoginKit
class ViewController: UIViewController {
var socialSignInService: SocialSignInInterface = SocialSignInService()
override func viewDidLoad() {
super.viewDidLoad()
}
import Foundation
import UIKit
import GoogleSignIn
import FBSDKLoginKit
import AccountKit
typealias GoogleSignInResponse = (_ user: GIDGoogleUser?, _ error: Error?) -> ()
typealias FacebookSignInResponse = (_ result: FBSDKLoginManagerLoginResult?, _ error: Error?) -> ()
typealias AccountKitSignInResponse = (_ account: AKFAccount?, _ token: AKFAccessToken?,_ error: Error?) -> ()
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
// Initialize Google sign-in
GIDSignIn.sharedInstance().clientID = "YOUR_CLIENT_ID" // get from Google Developer
// Initialize Facebook/AccountKit sign-in
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
return true
}
<plist version="1.0">
<dict>
...
<key>FacebookAppID</key>
<string>{your-app-id}</string>
<key>FacebookDisplayName</key>
<string>{your-app-name}</string>
<key>AccountKitClientToken</key>
<string>{your-account-kit-client-token}</string>
<key>CFBundleURLTypes</key>
@aidino
aidino / inout-example.swift
Created February 12, 2019 03:50
Inout example
func swapTwoInts(_ a: inout Int, _ b: inout Int) {
let temporaryA = a
a = b
b = temporaryA
}
var someInt = 3
var anotherInt = 107
swapTwoInts(&someInt, &anotherInt)
print("someInt is now \(someInt), and anotherInt is now \(anotherInt)")
// Defining a Base Class
class Vehicle {
var currentSpeed = 0.0
var description: String {
return "traveling at \(currentSpeed) miles per hour"
}
func makeNoise() {
// do nothing - an arbitrary vehicle doesn't necessarily make a noise
}
}
// Value type example
struct S {
var data: Int = -1
}
var a = S()
var b = a // a is copied to b
a.data = 42 // Changes a, not b
print("\(a.data), \(b.data)") //prints "42, -1"
// Reference type example
class C {
class MediaItem {
var name: String
init(name: String) {
self.name = name
}
}
class Movie: MediaItem {
var director: String
init(name: String, director: String) {
self.director = director
@aidino
aidino / googleSheetDropDown.gs
Created August 21, 2018 08:28
Dropdown google sheet
function onEdit() {
//Get active sheet
var activeSheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
if(activeSheet.getName() == "Transactions") {
Logger.log("onEdit Transactions sheet")
applyTransactionCategoryDropdown()
}
}
function applyTransactionCategoryDropdown() {