Skip to content

Instantly share code, notes, and snippets.

View freirezinho's full-sized avatar

Saulo Freire freirezinho

View GitHub Profile
@freirezinho
freirezinho / gist:32ada53c1900f2e0c4efff8e855b883d
Created November 7, 2020 12:36
“Carthage builds fail at xcrun lipo on Xcode 12 beta (3,4,5...)” issue workaround
https://github.com/Carthage/Carthage/issues/3019#issuecomment-664099506
@freirezinho
freirezinho / gist:0ddb3845f5753228f0ea6e7943ccebb8
Created September 30, 2020 18:20 — forked from bwhiteley/gist:049e4bede49e71a6d2e2
Initialize Swift subclass of UIView, designed in .xib
// Create CustomView.xib, set File's Owner to CustomView.
// Link the top level view in the XIB to the contentView outlet.
class CustomView : UIView {
@IBOutlet private var contentView:UIView?
// other outlets
override init(frame: CGRect) { // for using CustomView in code
super.init(frame: frame)
self.commonInit()
@freirezinho
freirezinho / extract_realm_database_android.sh
Last active March 2, 2020 12:26 — forked from jk2K/extract_realm_database_android.sh
how to export realm database, on macOS, work on Android 5.0+
#!/bin/bash
ADB_PATH="/Users/$(whoami)/Library/Android/sdk/platform-tools"
PACKAGE_NAME="com.company.app"
DB_NAME="default.realm"
DESTINATION_PATH="/Users/$(whoami)/Downloads/${DB_NAME}"
NOT_PRESENT="List of devices attached"
ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'`
if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then
echo "Make sure a device is connected"
else
@freirezinho
freirezinho / gist:9f23889e1731e666d7002914c7617ce1
Created January 20, 2020 17:19
Google Maps link functions
//Spaces can be changed to "+" or encoded as "%20".
//Linking to a location (No directions)
https://www.google.com/maps?q=760+West+Genesee+Street+Syracuse+NY+13204
//No starting point (User input required to generate directions).
https://www.google.com/maps?daddr=760+West+Genesee+Street+Syracuse+NY+13204
//With a set location as starting point (Automatically generates directions with no user input required).
https://www.google.com/maps?saddr=760+West+Genesee+Street+Syracuse+NY+13204&daddr=314+Avery+Avenue+Syracuse+NY+13204
@freirezinho
freirezinho / next_nginx.md
Last active January 4, 2020 19:59 — forked from kocisov/next_nginx.md
How to setup next.js app on nginx with letsencrypt

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw