Skip to content

Instantly share code, notes, and snippets.

# Submitting mobile apps for review
While there is much more information that can be provided, and settings that can be adjusted when submitting an app, these are the absolutely bare essentials that need to be prepared beforehand.
Given that everything is available, submitting an app shouldn't take longer than 2-4 hours.
Minimum requirements for App Store
· App Previews and Screenshots
You are required to have at least two screenshots, one from a 6.5 inch display (XS Max), and another from a 5.5 inch display (8 Plus).
The resolutions are 1242x2688 and 1242x2208 respectively.
@orhan-swe
orhan-swe / connect to postgres db with ssl using python
Created September 24, 2018 08:22
connect to postgres db with ssl using python
import dataset
def get_connection (db_user, db_password, db_hostname, db_name):
# for secure encryption channel to work you need to copy root.crt to ~/.postgresql/root.crt
# the root.crt can be found (after download rename to root.crt):
# https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem
connection_string="postgresql://{}:{}@{}/{}?sslmode=verify-full".format(db_user, db_password, db_hostname, db_name)
# Kill port 9000 on windows:
netstat -ano | find ":9000 "
//check the owner:
tasklist /fi "pid eq ****"
taskkill /pid **** /f
Snippets
Snippet Renders
imr Import React
imrc Import React / Component
impt Import PropTypes
cc Class Component
ccc Class Component With Constructor
sfc Stateless Function Component
cdm componentDidMount
@orhan-swe
orhan-swe / crontab examples
Last active March 19, 2018 12:31
crontab
#crone each morning at 7:
0 7 * * * path_to_script
#lets also so something each 15 min
*/15 * * * * path_to_script
#DO ON REBOOT:
@reboot path_to_script
@orhan-swe
orhan-swe / vim
Last active March 22, 2018 08:14
# 1.0 Macros
# 1.0 Multi-File
# 1.2 ctrl-w - window commands
# 1.2 tab commands
# 2.0 Search Replace
# 3.0 Visual Mode
# 4.0 Exiting
@orhan-swe
orhan-swe / docker
Last active November 26, 2018 13:35
docker
#Concepts:
Important to distinguish these three concepts:
1. Image
2. Container
(used when talking about docker-compose):
3. Bundle
4. Stacks
1. Image:
@orhan-swe
orhan-swe / cordova_install
Last active May 15, 2019 09:09
install and configure cordova for build
This is a configuration for a SPA, NOTE: you can get cordova to run even if your application is not 100% SPA but
then you should not follow these instructions
install java:
1) sudo apt-get update; sudo apt-get install -y openjdk-8-jdk
sudo npm install -g cordova
2) create config.xml // this file contains all plugins, restrictions and default settings of mobile applications
3) create www folder // this folder contains builded sources (each time webpack will copy build into this folder)
4) install android sdk on your machine
@orhan-swe
orhan-swe / jenkins_readme
Last active December 21, 2021 14:57
install jenkins and configure for auto deploy on ubuntu
## make sure java is installed, if not (must be java 8):
http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/
## install jenkins
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
echo deb https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list
sudo apt-get update
sudo apt-get install jenkins
@orhan-swe
orhan-swe / postgresql
Last active October 25, 2018 12:30
basic postgresql cheatsheet
https://blog.trackets.com/2013/08/19/postgresql-basics-by-example.html
login:
psql -U user db
or add data to your ~/.pgpass file: (ex: *:5432:*:postgresql:password)
postgres=# \h # help on SQL commands
postgres=# \? # help on psql commands, such as \? and \h
postgres=# \l # list databases