Add the Ruby script to your repo, and add this snippet into your new circle.yml
:
- deploy:
name: Merge and copy coverage data
command: bundle exec path/to/circle.rb
const MODULE_DIR = /(.*([\/\\]node_modules|\.\.)[\/\\](@[^\/\\]+[\/\\])?[^\/\\]+)([\/\\].*)?$/g; | |
{ | |
loader: 'babel-loader', | |
test: /\.jsx?$/, | |
include(filepath) { | |
if (filepath.split(/[/\\]/).indexOf('node_modules')===-1) return true; | |
let pkg, manifest = path.resolve(filepath.replace(MODULE_DIR, '$1'), 'package.json'); | |
try { pkg = JSON.parse(fs.readFileSync(manifest)); } catch (e) {} | |
return !!(pkg.module || pkg['jsnext:main']); |
import React from 'react'; | |
import { View, Text, TextInput, StyleSheet } from 'react-native'; | |
const styles = StyleSheet.create({ | |
wrapper: { | |
width: '90%', | |
height: 24, | |
position: 'relative', | |
alignSelf: 'center', | |
}, |
Mobile Safari does not support position: fixed
when an input focused and virtual keyboard displayed.
To force it work the same way as Mobile Chrome, you have to use position: absolute
, height: 100%
for the whole page or a container for your pseudo-fixed elements, intercept scroll
, touchend
, focus
, and blur
events.
The trick is to put the tapped input control to the bottom of screen before it activates focus. In that case iOS Safari always scrolls viewport predictably and window.innerHeight
becomes exactly visible height.
Open https://avesus.github.io/docs/ios-keep-fixed-on-input-focus.html in Mobile Safari to see how it works.
Please avoid forms where you have several focusable elements because more tricks to fix position will be necessary, those were added just for demonstration purposes.
This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don't support it natively (eg. GitHub Desktop, Eclipse, Git Tower, ...)
/** Usage: | |
* const MyView = unrecycle(props => { | |
* // this is normally a no-go and creates leaking styles, but it won't with unrecycle(): | |
* <input ref={ c => c && c.style.background='red' } /> | |
* }) | |
*/ | |
export default function unrecycle(Component) { | |
return function Unrecycle(props, context) { | |
this.componentWillUnmount = dontRecycle; | |
return Component.call(this, props, context); |
data Graph = Graph | |
{ pointsLeft :: Set.Set (V2 Double) | |
-- ^ All the points in the whole graph left to be connected | |
, branches :: Set.Set LineSegment | |
-- ^ All branches we have found, connecting two points | |
, currentPoints :: [V2 Double] | |
-- ^ Points that are currently being processed | |
, maxDist :: Double | |
-- ^ Maximum distance a thing can be away from a thing | |
} |
CREATE SEQUENCE public.global_id_seq; | |
ALTER SEQUENCE public.global_id_seq OWNER TO postgres; | |
CREATE OR REPLACE FUNCTION public.id_generator() | |
RETURNS bigint | |
LANGUAGE 'plpgsql' | |
AS $BODY$ | |
DECLARE | |
our_epoch bigint := 1314220021721; | |
seq_id bigint; |
import customModuleLoader = require('module'); | |
export class CustomModuleLoader { | |
public cOptions: any = require('../tsconfig.json').compilerOptions; | |
public replacePaths: any = {}; | |
constructor() { | |
Object.keys(this.cOptions.paths).forEach(alias => { | |
this.replacePaths[alias.replace(/\*.?/, '(.*)')] = this.cOptions.paths[alias][0].replace(/\*.?/, '$1'); |