Skip to content

Instantly share code, notes, and snippets.

View nelsonic's full-sized avatar
💭
Let's Build a Better World Together!☀️

Nelson nelsonic

💭
Let's Build a Better World Together!☀️
View GitHub Profile
@nelsonic
nelsonic / facebook-contact-info-summary.rb
Created March 23, 2018 15:46 — forked from dylanmckay/facebook-contact-info-summary.rb
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
# in whatever the working directory of the program is when executed.
#
@nelsonic
nelsonic / introrx.md
Created February 1, 2018 20:21 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@nelsonic
nelsonic / Main.elm
Created January 3, 2018 17:15 — forked from chrisbuttery/Main.elm
Elm 0.17. A simple Mouse.moves example
import Html exposing (Html, text, div)
import Html.App as Html
import Mouse exposing (..)
main =
Html.program
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
@nelsonic
nelsonic / up-and-running-with-edeliver-on-do.md
Created May 10, 2017 19:21 — forked from mattweldon/up-and-running-with-edeliver-on-do.md
Getting Elixir / Phoenix running on Digital Ocean with edeliver

Build Server

  • Go to Digital Ocean
  • Create new droplet
  • London
  • Ubuntu
  • No apps
  • Add SSH keys
@nelsonic
nelsonic / portable-node.md
Created August 29, 2016 10:10 — forked from domenic/portable-node.md
Tips for Writing Portable Node.js Code

Node.js core does its best to treat every platform equally. Even if most Node developers use OS X day to day, some use Windows, and most everyone deploys to Linux or Solaris. So it's important to keep your code portable between platforms, whether you're writing a library or an application.

Predictably, most cross-platform issues come from Windows. Things just work differently there! But if you're careful, and follow some simple best practices, your code can run just as well on Windows systems.

Paths and URLs

On Windows, paths are constructed with backslashes instead of forward slashes. So if you do your directory manipulation

{
"log": {
"version": "1.2",
"creator": {
"name": "F12 Developer Tools",
"version": ""
},
"entries": [
{
"startedDateTime": "2016-06-22T14:25:35.670Z",
@nelsonic
nelsonic / gist:eeaa42dbad21cda0e1a932472ecb9648
Created June 5, 2016 16:08
Walmart Mobile node.js Setup

Overview

We run multiple server processes in two data centers. Each process listens on two ports, one for HTTP and one for HTTPS. HTTPS is terminated by Apache prior to reaching node.js. HTTP goes directly from the client to node.js (through a master load balancer). We do not use clusters. We slice our physical servers into thin virtual machines running SmartOS, each with about 3GB of memory designed for a single node.js process.

Our node.js servers are hapi.js servers using the composer functionality and plugins architecture. We have three sets of plugins loaded: mobile web front end experience (single page app), legacy API reverse proxy, and monitoring.

We also serve original node.js services off another server zone which runs closed source plugins using hapi.

Analytics

{
"B11HhPUg": {
"id": "B11HhPUg",
"name": "Opvarmet pool",
"sections": [
{
"image": "http://images2.spies.dk/images/SiteID11/SitePage/hoteller-med-opvarmet-pool.jpg?v=1",
"text": "Hører du til dem, der elsker en forfriskende dukkert i poolen, men ikke bryder sig om at give den solvarme hud et iskoldt chok? Så kan vi anbefale at du bor på et af vores hoteller, som har opvarmet pool om vinteren. Så er du garanteret en ferie med skønt badevejr!",
"title": "Opvarmet pool"
}
@nelsonic
nelsonic / redis-server.conf
Last active August 29, 2015 14:27 — forked from bdotdub/redis.markdown
Running redis using upstart on Ubuntu
# https://gist.github.com/bdotdub/714533
description "redis server"
start on runlevel [23]
stop on shutdown
exec sudo -u redis /usr/bin/redis-server /etc/redis/redis.conf
respawn

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).