Skip to content

Instantly share code, notes, and snippets.

View seanlilmateus's full-sized avatar

Mateus seanlilmateus

View GitHub Profile
@seanlilmateus
seanlilmateus / ca.md
Created July 19, 2024 04:05 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@seanlilmateus
seanlilmateus / mkjail.sh
Created May 11, 2024 19:20 — forked from pixelomer/mkjail.sh
Create a macOS chroot jail with GNU bash and utilities
#!/usr/bin/env sh
#############################################
# WARNING #
# No more commits are going to be made to #
# this gist. Please get the latest script #
# from the new repository: #
# https://github.com/pixelomer/macos-mkjail #
#############################################
@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 byte-sourcerer/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: