Skip to content

Instantly share code, notes, and snippets.

View tonespy's full-sized avatar
🙄
Lol...

Abubakar Oladeji tonespy

🙄
Lol...
  • Netherlands
View GitHub Profile
@giannisp
giannisp / gist:ebaca117ac9e44231421f04e7796d5ca
Last active July 14, 2024 18:27
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
@Reusable
public class Migration implements RealmMigration
{
private Map<Integer, Provider<VersionMigration>> versionMigrations;
@Inject
Migration (Map<Integer, Provider<VersionMigration>> versionMigrations)
{
this.versionMigrations = versionMigrations;
}
@steipete
steipete / ios-xcode-device-support.sh
Last active September 16, 2024 18:26
Using iOS 15 devices with Xcode 12.5 (instead of Xcode 13)
# The trick is to link the DeviceSupport folder from the beta to the stable version.
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5:
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
# (A similar approach works for older versions too, just change the version number after DeviceSupport)
@ChrisXu
ChrisXu / .travis.yml
Last active January 16, 2019 22:14
Deploy an app automatically to Fabric Beta using Travis-CI.
language: objective-c
osx_image: xcode7.2
xcode_sdk: iphonesimulator9.2
env:
global:
- LANG=en_US.UTF-8
- WORKSPACE="YOUR_APP_WORKSPACE/YOUR_APP_PROJECT.xcworkspace"
- SCHEME="YOUR_BUILDSCHEME"
- APP_NAME="YOUR_APP_NAME"
@tonespy
tonespy / FloatLabelAutoCompleteTextView.java
Last active August 29, 2015 14:16
FloatLabelEditText Using NineOldAndroids For Animation
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.graphics.Typeface;
import android.text.Editable;
import android.text.TextWatcher;
import android.text.method.KeyListener;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.LayoutInflater;
@rdegges
rdegges / proxy_nginx.sh
Created April 11, 2011 05:30
Create a HTTP proxy for jenkins using NGINX.
sudo aptitude -y install nginx
cd /etc/nginx/sites-available
sudo rm default
sudo cat > jenkins
upstream app_server {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;