Skip to content

Instantly share code, notes, and snippets.

import React, { Component } from 'react';
import { Text, FlatList, View, StyleSheet, Button } from 'react-native';
import { Constants } from 'expo';
const TouchableTextConst = props => {
console.log(`TouchableTextConst${props.id} rendered, callback (re)created :(`);
const textPressed = () => {
props.onPressItem(props.id);
};
ffmpeg -i video.MOV -acodec copy -f segment -segment_time 10 -vcodec copy -reset_timestamps 1 -map 0 video-part%d.MOV
@florentroques
florentroques / index.html
Created January 15, 2017 15:28 — forked from jazzido/index.html
Webcam barcode reading (zbar, emscripten)
<!DOCTYPE html>
<html>
<head>
<title>JS in-browser barcode reader</title>
<style type="text/css">
body > div {
position: relative;
width: 320px; height: 240px;
}
video { position: absolute; top: 0; left: 0; width: 320px; height: 240px; }
@florentroques
florentroques / immutable-libraries.md
Created December 17, 2016 02:22 — forked from jlongster/immutable-libraries.md
List of immutable libraries

A lot of people mentioned other immutable JS libraries after reading my post. I thought it would be good to make a list of available ones.

There are two types of immutable libraries: simple helpers for copying JavaScript objects, and actual persistent data structure implementations. My post generally analyzed the tradeoffs between both kinds of libraries and everything applies to the below libraries in either category.

Libraries are sorted by github popularity.

Persistent Data Structures w/structural sharing

#Good practices

  • package.json:
    • give the exact version of a script
    • gitignore node_modules directory

##Packages to use

  • mongoose: writing MongoDB validation, casting and business logic boilerplate
  • express: launch a web server
  • superagent: test http requests
  • Data aggregation is the grouping of data in summary form.
  • Daily Count is the count of orders in a day.
  • Daily Revenue Count is the revenue on orders per day.
  • Product Sum is the total revenue of a product.
  • Subqueries can be used to perform complicated calculations and create filtered or aggregate tables on the fly.
  • Reorder Rate is the ratio of the total number of orders to the number of people making orders.
#!/bin/bash
checkExisting(){
echo "Checking if already existing device on file..."
while read fileLine; do
if [ "$line" = "$fileLine" ]; then
echo "[WARNING] Device already initialized on this system. Nothing to do here"