Skip to content

Instantly share code, notes, and snippets.

View felipefpx's full-sized avatar

Felipe Porge Xavier felipefpx

View GitHub Profile
@felipefpx
felipefpx / step_1_getting_started_datomic.txt
Last active August 5, 2023 16:56
Getting Started with Datomic
### Download and setup
1. Initially, download the Datomic Pro version on the official website: https://docs.datomic.com/pro/getting-started/get-datomic.html
2. Unzip the zip file and move the folder for your desired path, in this case, it will be on `$HOME/datomic`
3. Prepare the config file on `$HOME/datomic/config`, there are some examples on `$HOME/datomic/config/samples`
4. Add the aliases to your terminal startup file (e.g. `~/.bashrc` or `~/.zshrc`) that will be useful for dealing with your Datomic:
```
# To start Datomic REPL:
alias datomic-repl="$HOME/datomic/bin/repl"
@felipefpx
felipefpx / coverage.sh
Created September 1, 2019 10:29
Jacoco Merged Report for Multimodule Android with Kotlin DSL
#!/bin/bash
clear
./gradlew clean mergedJacocoReport
./gradlew jacocoFullReport
REPORT_PATH="file://$(pwd)/build/reports/jacoco/jacocoFullReport/html/index.html"
echo ${REPORT_PATH} | pbcopy
echo "Report available at:"
echo ${REPORT_PATH}
echo "Report file path copied to clipboard. You can paste it in your favorite browser. :)"
apply plugin: 'jacoco'
jacoco {
toolVersion = "0.8.3-SNAPSHOT"
reportsDir = file("$buildDir/reports")
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
}
@nantsou
nantsou / AesCbc.py
Created March 6, 2019 15:48
AES/CBC/PKCS5PADDING in python
# -*- coding: utf-8 -*-
from Crypto.Cipher import AES
import base64
import re
DEFAULT_KEY = 'anrxvpAAa9x5kEUm'
class AesCbc:
@dlew
dlew / script.sh
Created November 9, 2018 16:36
Simple AndroidX Migration Script
#!/usr/bin/env bash
# I've found that the "Migrate to AndroidX" converter in Android Studio doesn't work very
# well, so I wrote my own script to do the simple job of converting package names.
#
# You can download a CSV of package names here: https://developer.android.com/topic/libraries/support-library/downloads/androidx-class-mapping.csv
#
# It'll run faster on a clean build because then there are fewer files to scan over.
#
# Uses `gsed` because I'm on a Mac. Can easily replace with `sed` if you don't have `gsed`.
@hothero
hothero / aes_cbc_pkcs5.go
Last active March 30, 2024 02:53
AES/CBC/PKCS5Padding implementation by Golang (can work with JAVA, C#, etc.)
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"encoding/base64"
"fmt"
)
@kaeawc
kaeawc / codecov.yml
Last active December 20, 2021 13:15
Jacoco settings for multi module multi flavor Kotlin Android app
codecov:
branch: master
bot: null
coverage:
precision: 2
round: down
range: "70...100"
status:
@trinnguyen
trinnguyen / config.yml
Last active October 19, 2018 14:58
CircleCI 2.0 Android config with Keystore Signing
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-25-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
@mbinna
mbinna / podforceupdate.sh
Created December 4, 2012 09:43
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active July 20, 2024 00:44
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S