Skip to content

Instantly share code, notes, and snippets.

View marcioadr88's full-sized avatar

Marcio Duarte marcioadr88

View GitHub Profile
@tehprofessor
tehprofessor / karabiner-fix.sh
Created July 4, 2019 18:03
Karabiner Elements "Fix-It" for Catalina Beta
#!/bin/sh
KARABINER_ELEMENTS_PATH="/Applications/Karabiner-Elements.app"
echo "Killing Karabiner & associated processes"
sudo pkill -f Karabiner -9 # Kills the main Karabiner UI
sudo pkill -f karabiner -9 # Kills the background processes
echo "Starting Karabiner-Elements... It may be up to a minute after opening Karabiner-Elements before your custom keys activate."
open $KARABINER_ELEMENTS_PATH # Open it back up!
@morishin
morishin / left-align-stack-view.png
Last active March 22, 2024 00:25
Align to Left the contents of UIStackView
left-align-stack-view.png
import FirebaseFirestore
private struct Property {
let label: String
let value: Any
}
struct FirestoreModelData {
let snapshot: DocumentSnapshot
@cmc5788
cmc5788 / Rx+Util.swift
Last active November 14, 2020 01:34
General RxSwift utility stuffs
import RxSwift
extension UIButton {
public func throttledTapObservable(_ throttle : RxTimeInterval = 1.0) -> RxSwift.Observable<Swift.Void> {
return self.rx.tap.asObservable()
.throttle(throttle, latest: false, scheduler: MainScheduler.instance)
}
}
@rexlow
rexlow / md
Last active April 22, 2023 16:11
Run React Native on specific iOS simulator version
To add a simulator
Choose Hardware > Device > Manage Devices.
Xcode opens the Devices window.
At the bottom of the left column, click the Add button (+).
In the dialog that appears, enter a name in the Simulator Name text field and choose the device from the Device Type pop-up menu.
//by default
@diogofrazao
diogofrazao / facebook_login.js
Last active August 16, 2020 15:44
Login in Facebook with PhantomJS
var webPage = require('webpage');
var page = webPage.create();
var fs = require('fs');
var CookieJar = "cookiejar.json";
var pageResponses = {};
page.settings.userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36';
page.settings.javascriptEnabled = true;
page.settings.loadImages = false;
phantom.cookiesEnabled = true;
@tomysmile
tomysmile / brew-java-and-jenv.md
Last active September 30, 2024 19:44
How To Install Java 8 on Mac

Install HomeBrew first

brew update
brew tap caskroom/cask
brew install brew-cask

If you get the error "already installed", follow the instructions to unlink it, then install again:

@JaviLorbada
JaviLorbada / FRP iOS Learning resources.md
Last active March 19, 2025 07:02
The best FRP iOS resources.

Videos

@zwaldowski
zwaldowski / DynamicTypeLabel.swift
Last active April 26, 2016 20:18 — forked from indragiek/DynamicTypeLabel.swift
Dynamic Type, made dynamic - with Avenir!
//
// DynamicTypeLabel.swift
//
// Created by Indragie on 10/16/14.
// Copyright (c) 2014 Indragie Karunaratne. All rights reserved.
//
import UIKit
class DynamicTypeLabel : UILabel {
@apollolm
apollolm / nginx-ssl-config
Last active January 12, 2023 14:47
Nginx Configuration with multiple port apps on same domain, with SSL.
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_geoforce {
server 127.0.0.1:3000;
}
upstream app_pcodes{
server 127.0.0.1:3001;
}