Skip to content

Instantly share code, notes, and snippets.

View jaimeagudo's full-sized avatar

Jaime Agudo jaimeagudo

  • Freelance
View GitHub Profile
@joelbowen
joelbowen / README.md
Last active September 19, 2018 13:49
create-react-native-app environment variables

Change your app.json to base-app.json and untrack the original file in your .gitignore

Then add something like "generateConfig": "rimraf app.json && node generateConfig" to your package.json scripts, and yarn generateConfig && react-native-scripts start to scripts like "start" or any others that may need app.json generated.

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.
@j-jith
j-jith / miui-fastboot-howto.rst
Last active May 9, 2024 06:37
How to flash MIUI Fastboot ROM from Linux

How to flash MIUI Fastboot ROM from Linux

@sergeyklay
sergeyklay / sed-cheatsheet.md
Last active July 8, 2023 01:44
Sed Cheatsheet

Sed Cheat Sheet

Sed command line options

sed [options] sed-command [input-file]
Option Description Example
@colus001
colus001 / Create iOS Icons 2016 Sizes with 180.jsx
Last active April 4, 2020 05:25 — forked from alexsdesign/Create iOS Icons 2016 Sizes.jsx
Photoshop Script to Create iOS Icons from a source image
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
@rudelm
rudelm / autofs.md
Last active April 29, 2024 02:26
Use autofs on Mac OS X to mount network shares automatically during access

Autofs on Mac OS X

With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.

Prepare autofs to use a separate configuration file

autofs needs to be configured so that it knows where to gets its configuration. Edit the file /etc/auto_master and add the last line:

#
# Automounter master map
#

+auto_master # Use directory service

@Integralist
Integralist / 0. description.md
Last active June 17, 2023 21:49
Clojure deftype, defrecord, defprotocol
  • defprotocol: defines an interface
  • deftype: create a bare-bones object which implements a protocol
  • defrecord: creates an immutable persistent map which implements a protocol

Typically you'll use defrecord (or even a basic map);
unless you need some specific Java inter-op,
where by you'll want to use deftype instead.

Note: defprotocol allows you to add new abstractions in a clean way Rather than (like OOP) having polymorphism on the class itself,

@staltz
staltz / introrx.md
Last active May 10, 2024 12:08
The introduction to Reactive Programming you've been missing
// Photoshop Script to Create iPhone Icons from iTunesArtwork//// WARNING!!! In the rare case that there are name collisions, this script will// overwrite (delete perminently) files in the same folder in which the selected// iTunesArtwork file is located. Therefore, to be safe, before running the// script, it's best to make sure the selected iTuensArtwork file is the only// file in its containing folder.//// Copyright (c) 2010 Matt Di Pasquale// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com//// Permission is hereby granted, free of charge, to any person obtaining a copy// of this software and associated documentation files (the "Software"), to deal// in the Software without restriction, including without limitation the rights// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell// copies of the Software, and to permit persons to whom the Software is// furnished to do so, subject to the following conditions://// The above copyright notice and

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: