Skip to content

Instantly share code, notes, and snippets.

View hroland's full-sized avatar

roland hroland

View GitHub Profile
@agrcrobles
agrcrobles / android_instructions_29.md
Last active June 2, 2024 05:54 — forked from patrickhammond/android_instructions.md
Setup Android SDK on OSX with and without the android studio

Hi, I am a fork from https://gist.github.com/patrickhammond/4ddbe49a67e5eb1b9c03.

A high level overview for what I need to do to get most of an Android environment setup and maintained on OSX higher Catalina and Big Sur with and without Android Studio been installed.

Considering the SDK is installed under /Users/<your_user>/Library/Android/sdk folder which is the Android Studio preferred SDK location, but it works fine under /usr/local/share/android-sdk as well, which is a location pretty much used on CI mostly.

Prerequisites:

https://github.com/shyiko/jabba instead ?

@braxtonb
braxtonb / App.js
Created November 15, 2017 22:52
Bridge a native iOS view and module to React Native using swift and objective-c
import React from 'react';
import KTComposite from './src/nativeComposite/KTComposite/KTComposite';
const App = () => <KTComposite />;
export default App;
@nguyenkims
nguyenkims / sync-sequel-pro-favorite.md
Created October 10, 2017 09:53
Sync sequel pro favorites between macs

The sequel pro favorites can be shared between Macs using cloud storage service like Dropbox, Google Drive, OneDrive, etc.

The trick is to create a file that will be synced using these cloud services and sequel pro favorites file is just a symlink to this file.

The below script is used for OneDrive but it can also work for Dropbox and other cloud storages.

  1. Copy the current sequel pro favorites file

cp ~/Library/Application\ Support/Sequel\ Pro/Data/Favorites.plist ~/OneDrive/SequelPro.plist

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active June 7, 2024 18:27 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Note

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Updates

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active May 4, 2024 14:06
React Native Bridging Cheatsheet
@primaryobjects
primaryobjects / repeated-substring.js
Created January 24, 2017 03:31
Repeated Substring Pattern, searching for a repeatable substring within a string.
/**
* @param {string} str
* @return {boolean}
*/
var repeatedSubstringPattern = function(str) {
var result = false;
var sameCount = 1;
for (var i=1; i<str.length; i++) {
if (str[i] === str[0]) {
@sgr-ksmt
sgr-ksmt / UIView+NibInstantiatable.swift
Last active October 20, 2021 13:33
Load ViewController from Storyboard or View from Xib (These are same name.) Require : Swift 2.0
protocol NibInstantiatable {
static var NibName: String { get }
}
extension NibInstantiatable {
static var NibName: String { return String(Self) }
static func instantiate() -> Self {
return instantiateWithName(NibName)
@vlas-voloshin
vlas-voloshin / delete-duplicate-sims.rb
Last active April 18, 2024 19:04
Script for deleting duplicate iOS simulators and fixing simulators list in Xcode
#!/usr/bin/env ruby
# What is this for?
# This script fixes an issue appeared for some Xcode users where it would show long identifiers
# in the list of simulators instead of usual short names. This is caused by duplicate simulators
# being sometimes created after switching between Xcode versions, with the same
# device type + runtime pair occurring more than once in your list of available simulators.
# Instead of showing the same simulator name twice, Xcode defaults to simulator identifiers.
#
# What it does?
#!/bin/sh
# block torrent traffic by iptable/firewall for VPN/Proxy server
# me@tartan.pro
# Delete all existing rules
iptables -F
# Set default chain policies
iptables -P INPUT DROP
iptables -P FORWARD DROP