Skip to content

Instantly share code, notes, and snippets.

View seanlilmateus's full-sized avatar

Mateus seanlilmateus

View GitHub Profile
@seanlilmateus
seanlilmateus / BrutoButtons.swift
Created April 22, 2024 19:09 — forked from juanjovn/BrutoButtons.swift
SwiftUI buttons in a Neubrutalism style
//
// 🌯⚡️ UI Components included in WrapFast SwiftUI Starter Kit: https://WrapFa.st
//
import SwiftUI
struct BrutoButtonStyle: ButtonStyle {
@ViewBuilder
func makeBody(configuration: Configuration) -> some View {
configuration.label
@seanlilmateus
seanlilmateus / MacEditorTextView.swift
Created March 9, 2024 21:19 — forked from cjwcommuny/MacEditorTextView.swift
An NSTextView wrapped by SwiftUI with TextKit 2
/**
* MacEditorTextView
* Copyright (c) Thiago Holanda 2020-2021
* https://twitter.com/tholanda
*
* MIT license
* Modified by https://github.com/cjwcommuny for TextKit 2
*/
import Combine
@seanlilmateus
seanlilmateus / gist:a0d17fcc3076db074c8b07554d15f962
Created February 23, 2024 08:04 — forked from prodamin/gist:334e761dd2e879d9f803886a5cd44a82
Convert a PostgreSQL database from SQL_ASCII to UTF8 encoding
# convert createdb's template to UTF8
echo "UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';" | psql -U postgres
echo "drop database template1;" | psql -U postgres
echo "create database template1 with template = template0 encoding = 'UTF8';" | psql -U postgres
echo "update pg_database set datacl='{=c/postgres,postgres=CTc/postgres}' where datname='template1';" | psql -U postgres
echo "UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';" | psql -U postgres
# export and reimport as UTF8
pg_dump -U uniiverse --encoding utf8 mydatabase -f mydatabase_utf8.sql
createdb -U postgres -E utf8 mydatabase_utf8
@seanlilmateus
seanlilmateus / DefaultKeyBinding.dict
Created February 6, 2024 09:08 — forked from trusktr/DefaultKeyBinding.dict
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
@seanlilmateus
seanlilmateus / gist:1ceb23960f3e43bde7bb83f1d8d4f9a0
Created January 19, 2024 15:44 — forked from tsohr/gist:5711945
Android activity manager "am" command help
adb shell am
usage: am [subcommand] [options]
usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>]
[--R COUNT] [-S] [--opengl-trace] <INTENT>
am startservice <INTENT>
am force-stop <PACKAGE>
am kill <PACKAGE>
am kill-all
am broadcast <INTENT>
am instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w]
@seanlilmateus
seanlilmateus / adb.sh
Created January 19, 2024 15:24 — forked from 1901/adb.sh
[adb] #android #adb
adb shell am start -W -a android.intent.action.VIEW -d "https://main.sea.camexgame.com/instant"
adb shell am start -W -a android.intent.action.VIEW -d "https://instant.app/com.camex.tactical.monsters"
adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "https://play.google.com/store/apps/details?id=com.camex.tactical.monster&launch=true"
@seanlilmateus
seanlilmateus / adb.sh
Created January 19, 2024 15:24 — forked from 1901/adb.sh
[adb] #android #adb
adb shell am start -W -a android.intent.action.VIEW -d "https://main.sea.camexgame.com/instant"
adb shell am start -W -a android.intent.action.VIEW -d "https://instant.app/com.camex.tactical.monsters"
adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "https://play.google.com/store/apps/details?id=com.camex.tactical.monster&launch=true"
  • list packages adb shell pm list packages -f
  • delegate package adb shell am start -a android.intent.action.DELETE -d package:
@seanlilmateus
seanlilmateus / anim-part6.swift
Created October 15, 2023 09:45 — forked from swiftui-lab/anim-part6.swift
Examples for SwiftUI Blog Post (Advanced SwiftUI Animations - Part 6)
// Author: SwiftUI-Lab (swiftui-lab.com)
// Description: Advanced SwiftUI Animations - Part 6 Examples
// blog article: https://swiftui-lab.com/swiftui-animations-part6
import SwiftUI
struct ContentView: View {
@State var show: Int? = nil
var body: some View {
@seanlilmateus
seanlilmateus / SwiftUIDataUnitTest.swift
Created October 12, 2023 02:12 — forked from helje5/SwiftUIDataUnitTest.swift
Unit Testing a SwiftUI Query
//
// Created by Helge Heß.
// Copyright © 2023 ZeeZide GmbH.
//
import XCTest
import UIKit
import SwiftData
import SwiftUI