Skip to content

Instantly share code, notes, and snippets.

react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
cd android && ./gradlew assembleRelease
@padupuy
padupuy / MockRequest.js
Last active May 9, 2017 10:02
use kakapo to mock data
import {Server, Router, Database} from 'kakapo';
import {isDevMode} from './env';
import * as URL from './constants';
import authFixture from './auth.fixture.js';
import profileFixture from './profile.fixture.js';
const singleton = Symbol();
const singletonEnforcer = Symbol();
@padupuy
padupuy / Input.js
Created May 16, 2017 11:52
RN Picker
import React, {Component} from 'react';
import {
View,
TextInput,
StyleSheet,
Platform,
} from 'react-native';
export default (props) => {
const {styleWrapper, style, ...rest} = {...props};
@padupuy
padupuy / DummyScreen.js
Created May 30, 2017 16:29
Android zIndex bug
import React, {Component} from 'react';
import {
StyleSheet,
View,
Text,
} from 'react-native';
export default class DummyScreen extends Component {
render() {
return (
@padupuy
padupuy / DummyScreen.js
Created May 30, 2017 16:54
Android zIndex OK
import React, {Component} from 'react';
import {
StyleSheet,
View,
Text,
} from 'react-native';
export default class DummyScreen extends Component {
render() {
return (
@padupuy
padupuy / help.sh
Created September 1, 2017 08:25
Launch specific iOS simulator
#installation
gem install xcode-install
xcversion simulators --install='iOS 9.3'
#list de tous les devices utilisables qui permettent de récupérer l'udid
xcrun simctl list
#lancement du simulateur
/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID <UDID>
@padupuy
padupuy / record.sh
Last active September 13, 2017 09:06
Record devices from cli
# Use the command line interface
# For ios https://developer.apple.com/library/content/documentation/IDEs/Conceptual/iOS_Simulator_Guide/InteractingwiththeiOSSimulator/InteractingwiththeiOSSimulator.html
xcrun simctl io booted recordVideo appvideo.mov
# For android https://developer.android.com/studio/command-line/adb.html#screenrecord
adb shell screenrecord --verbose /sdcard/appvideo.mp4
adb pull /sdcard/appvideo.mp4 /Users/project/destination
@padupuy
padupuy / zip.sh
Created September 20, 2017 10:57
Zip
#compress
tar -zcvf archive_name.tar.gz folder_to_compress
#extract
tar -zxvf archive_name.tar.gz
@padupuy
padupuy / index.html
Last active October 25, 2017 14:08
horizontal scrolling
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<title>PAX</title>
<meta name="description" content="PAX gist" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/style.css?" rel="stylesheet" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />