Skip to content

Instantly share code, notes, and snippets.

View geovanisouza92's full-sized avatar
🏠
Working from home

Geo geovanisouza92

🏠
Working from home
View GitHub Profile
import React from "react";
import { render } from "react-dom";
import Task from "data.task";
import TaskComponent from "./TaskComponent";
const users = [
{ id: 1, name: "User A", points: 45 },
{ id: 2, name: "User B", points: 22 },
{ id: 3, name: "User C", points: 79 },
{ id: 4, name: "User D", points: 54 }
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active March 12, 2024 22:46
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# 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
@posener
posener / go-shebang-story.md
Last active March 29, 2024 08:38
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@staltz
staltz / adnetworks.txt
Created November 20, 2016 10:34
Ban these domains of ad networks
101com.com, 101order.com, 123found.com, 180hits.de, 180searchassistant.com, 1x1rank.com, 207.net, 247media.com, 24log.com, 24log.de, 24pm-affiliation.com, 2mdn.net, 2o7.net, 360yield.com, 4affiliate.net, 4d5.net, 50websads.com, 518ad.com, 51yes.com, 600z.com, 777partner.com, 77tracking.com, 7bpeople.com, 7search.com, 99count.com, a-ads.com, a-counter.kiev.ua, a.0day.kiev.ua, a.aproductmsg.com, a.collective-media.net, a.consumer.net, a.mktw.net, a.sakh.com, a.ucoz.net, a.ucoz.ru, a.xanga.com, a32.g.a.yimg.com, aaddzz.com, abacho.net, abc-ads.com, absoluteclickscom.com, abz.com, ac.rnm.ca, accounts.pkr.com.invalid, acsseo.com, actionsplash.com, actualdeals.com, acuityads.com, ad-balancer.at, ad-balancer.net, ad-center.com, ad-images.suntimes.com, ad-pay.de, ad-rotator.com, ad-server.gulasidorna.se, ad-serverparc.nl, ad-souk.com, ad-space.net, ad-tech.com, ad-up.com, ad.100.tbn.ru, ad.71i.de, ad.980x.com, ad.a8.net, ad.abcnews.com, ad.abctv.com, ad.about.com, ad.aboutit.de, ad.aboutwebservices.com, ad.abum.com,
@wclr
wclr / cycle-state-ramda.md
Last active April 6, 2018 15:06
A way to handle state in cycle.js

A way to handle state in cycle.js

Simple state management with xstream and ramda, in more transparent fashion than onionify

import * as R from 'ramda'

// first we create factory for making special state stream 
// that will hold our stream value and will be modified with supplied streams of reducers
type StateReducer<T> = (state: T) => T
@schickling
schickling / _README.md
Last active January 4, 2024 09:37
Script to import and export docker-machine configurations to sync between hosts/collaborators

docker-machine import/export

Script to import and export docker-machine configurations to sync between hosts/collaborators

Export (on host A)

$ docker-machine ls
NAME       ACTIVE   DRIVER         STATE     URL                            SWARM   DOCKER    ERRORS
dev        -        digitalocean   Running   tcp://example.com:2376                 v1.10.1
@OlegIlyenko
OlegIlyenko / Event-stream based GraphQL subscriptions.md
Last active February 24, 2024 04:41
Event-stream based GraphQL subscriptions for real-time updates

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.

@JoanZapata
JoanZapata / Main.kt
Created February 1, 2015 18:44
Experimentation with Rx (2)
import rx.Observable
import java.io.File
import rx.schedulers.Schedulers
import java.util.concurrent.Executors
/** Make it true to show some logs during computation. */
val DEBUG = true
/** Basic data structure to add information to a file reference. */
data class FileInfo(val file: File, var bytes: Long = 0, var filesCount: Long = 1)
@ssinss
ssinss / EndlessRecyclerOnScrollListener.java
Last active January 19, 2024 08:52
Endless RecyclerView OnScrollListener
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener {
public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName();
private int previousTotal = 0; // The total number of items in the dataset after the last load
private boolean loading = true; // True if we are still waiting for the last set of data to load.
private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more.
int firstVisibleItem, visibleItemCount, totalItemCount;