Skip to content

Instantly share code, notes, and snippets.

View markbiek's full-sized avatar

Mark Biek markbiek

View GitHub Profile
/*
Styles for https://gist.github.com/markbiek/f807dd8235a7fa9c68a6f9862bf4790d
*/
* {
box-sizing: border-box;
}
.grid {
display: flex;
@markbiek
markbiek / dnd.js
Last active February 4, 2018 20:00
HTML5 drag-and-drop with React + Redux
/*
Note: This is organized in a strange way so it can run as a CodePen (https://codepen.io/markbiek/pen/KQzoVM?editors=0110)
See https://gist.github.com/markbiek/d5942ae8c43757719db5422793e10f67 for styles
*/
/* Data functions */
/***************************************/
const { fromJS, mergeDeep } = Immutable;
{
"items": ["a", "b", "c"],
"paging": {
"next": "http://next/url"
}
}
checkLogs({
onComplete: messages => {
console.log(messages.length);
}
});
function checkLogs(opts) {
// Initialize the array where we store our messages (only called the first time)
if (!opts.hasOwnProperty('messages')) {
opts.messages = [];
}
// Make the initial call to get the generator, specifying th
function* getLogs(url) {
// Loop forever, yielding the results of the ajax call to the caller
while (true) {
yield axios.get(url, {}).then(resp => {
const { data: { paging, items } } = resp;
if (items && items.length > 0)
[default]
region = us-east-1 # Or your preferred default region
[profile via]
aws_access_key_id = <AWS KEY>
aws_secret_access_key = <AWS SECRET>
{
"AttributeDefinitions": [
{
"AttributeName": "Deleted",
"AttributeType": "S"
},
{
"AttributeName": "Id",
"AttributeType": "S"
}
# Project
/cache/
node_modules
# WordPress
webroot/wp-content/advanced-cache.php
webroot/wp-content/backup-db/
webroot/wp-content/backups/
webroot/wp-content/cache/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
Button,
Navigator,
View,
TouchableHighlight
} from 'react-native';