Skip to content

Instantly share code, notes, and snippets.

View radinreth's full-sized avatar
👨‍💻
Hello World!

Radin Reth radinreth

👨‍💻
Hello World!
View GitHub Profile
@radinreth
radinreth / README.md
Created April 23, 2020 14:53 — forked from napcs/README.md
Deploying Rails to Linode

Deploying Rails to Linode

Installing Ruby Enterprise Edition, Apache, MySQL, and Passenger for deploying Rails 3.0 applications.

Get a Linode, and set it up with Ubuntu 10.04 LTS so that you have till April 2013 to get updates. Once the Linode is formatted, boot it and continue on.

Set up an 'A' record in your DNS, pointing to the IP of your Linode. I'm using demo.napcs.com here.

Initial setup

import React, { Component } from 'react';
import { View, Button, Text, TextInput, Image } from 'react-native';
import firebase from 'react-native-firebase';
const successImageUri = 'https://cdn.pixabay.com/photo/2015/06/09/16/12/icon-803718_1280.png';
export default class PhoneAuthTest extends Component {
constructor(props) {
super(props);
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rnsociallogin">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
package com.rnsociallogin;
import android.content.Intent;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
package com.rnsociallogin;
import android.app.Application;
import com.facebook.CallbackManager;
import com.facebook.FacebookSdk;
import com.facebook.reactnative.androidsdk.FBSDKPackage;
import com.facebook.appevents.AppEventsLogger;
import com.facebook.react.ReactApplication;
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View} from 'react-native';
import { LoginButton, AccessToken } from 'react-native-fbsdk';
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
android:
'Double tap R on your keyboard to reload,\n' +
'Shake or press menu button for dev menu',
});
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'rnSocialLogin' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for rnSocialLogin
rn_path = '../node_modules/react-native'
rn_maps_path = '../node_modules/react-native-maps'
@radinreth
radinreth / gist:197ba33f745a471958eb1ab27c28d181
Created December 11, 2018 02:31
Common problems React-Native
IOS, react-native version 0.56.0
Error: Build error in Xcode 10 "Multiple commands produce..."
Solution:
```
https://github.com/wix/react-native-navigation/issues/3608
```
# https://stackoverflow.com/questions/28116927/postgres-permission-denied-to-create-database-on-rake-dbcreateall
I have faced same issues when running rake db:test:prepare in postgresql on my Ruby on Rails project. This is pretty clear from the error message, that its a permission issue for the user. I added CREATEDB permission for new_user as following from the console.
To access postgres console:
$ sudo -u postgres -i
postgres@host:~$ psql
In there:
Python Microservices Development
Statistics for Machine Learning
Mastering Blockchain
Expert Angular
Python GUI Programming Cookbook - Second Edition
Modern C++ Programming Cookbook
Applied Network Security
Python Machine Learning By Example
Python Social Media Analytics
Expert Delphi