Skip to content

Instantly share code, notes, and snippets.

View sezabass's full-sized avatar
🏠
Working from home

Cesar Castro sezabass

🏠
Working from home
View GitHub Profile
@sezabass
sezabass / file-transfer-agent.sh
Created June 16, 2021 21:39
Enable/disable Android File Transfer agent on MacOS
# alias for disabling Android File Transfer agent
disableFileTransfer(){
PID=$(ps -fe | grep "[A]ndroid File Transfer Agent" | awk '{print $2}')
if [[ -n $PID ]];
then
kill $PID
fi
mv "/Applications/Android File Transfer.app/Contents/Helpers/Android File Transfer Agent.app" "/Applications/Android File Transfer.app/Contents/Helpers/Android File Transfer Agent DISABLED.app"
mv "${HOME}/Library/Application Support/Google/Android File Transfer/Android File Transfer Agent.app" "${HOME}/Library/Application Support/Google/Android File Transfer/Android File Transfer Agent DISABLED.app"
osascript -e 'tell application "System Events" to delete every login item whose name is "Android File Transfer Agent"'
@sezabass
sezabass / Cache-Article-Whole-CI-File.yml
Last active April 8, 2023 02:47
Cache-Article-Whole-CI-File
name: PR Verification
on:
push:
branches:
- develop
pull_request:
jobs:
pr-verification:
runs-on: ubuntu-latest
@sezabass
sezabass / Cache-Article-Chunk-Build-Runner.yml
Last active April 8, 2023 02:46
Cache-Article-Chunk-Build-Runner
- name: Cache build runner
uses: actions/cache@v2
with:
path: |
**/.dart_tool
**/*.g.dart
**/*.mocks.dart
**/*.config.dart
key: build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }}
restore-keys: |
@sezabass
sezabass / Cache-Article-Chunk-Pubspec.yml
Created May 3, 2021 03:50
Cache-Article-Chunk-Pubspec
- name: Cache pubspec dependencies
uses: actions/cache@v2
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.packages
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }}
@sezabass
sezabass / Cache-Article-Chunk-Flutter.yml
Created May 3, 2021 03:48
Cache-Article-Chunk-Flutter
- name: Cache flutter
uses: actions/cache@v2
with:
path: |
${{ env.FLUTTER_HOME }}/bin
key: install-flutter-1.22.6
restore-keys: |
install-flutter-
@sezabass
sezabass / openDeepLink.sh
Last active March 22, 2021 22:00
Open DeepLink helper for testing apps
@sezabass
sezabass / gist:f9ddc64acef903611cac9f280a1e0954
Last active June 17, 2021 15:34
Linux alias for git rename remote branch
git-rename-remote-branch() {
currentbranch="$(git branch --show-current)" # not the best method for scripting
git branch -m $1
git push origin :$currentbranch $1
git push origin -u $1
}
@sezabass
sezabass / SSLHelperKotlin.kt
Last active June 10, 2024 09:09
Kotlin version for this Java solution: https://stackoverflow.com/a/58325184/1404279
package crawlers
import java.security.KeyManagementException
import java.security.NoSuchAlgorithmException
import java.security.SecureRandom
import java.security.cert.X509Certificate
import javax.net.ssl.SSLContext
@sezabass
sezabass / BindingAdapters.kt
Last active October 22, 2019 12:30
BindingAdapter for ImageView that adds transparency to a given bitmap
import android.graphics.Bitmap
import android.graphics.Color
import android.widget.ImageView
import androidx.annotation.ColorRes
import androidx.core.content.ContextCompat.getColor
import androidx.databinding.BindingAdapter
import coil.api.load
object BindingAdapters {