Skip to content

Instantly share code, notes, and snippets.

View vadymhimself's full-sized avatar

Vadym O. vadymhimself

  • Bali, Indonesia
View GitHub Profile
@donmccurdy
donmccurdy / csv-processing.js
Created October 31, 2018 20:45
example CSV transformation in Node.js
const fs = require('fs')
const csv = require('csv');
fs.createReadStream('data.csv')
.pipe(csv.parse({columns: true}))
.pipe(csv.transform((input) => {
return Object.assign({}, input, {
foo: input['foo'].toUpperCase()
});
}))
@mpyw
mpyw / Logger.js
Created August 14, 2018 17:46
Send your browser console errors to AWS CloudWatch. Inspired by https://github.com/agea/console-cloud-watch
import React, { Component } from 'react'
import CloudWatchLogs from 'aws-sdk/clients/cloudwatchlogs'
import Fingerprint2 from 'fingerprintjs2'
import StackTrace from 'stacktrace-js'
import { promisify } from 'es6-promisify'
export default class Logger {
events = []
originalConsole = null
@iPaulPro
iPaulPro / include_list_viewpager.xml
Last active March 7, 2024 11:13
CollapsingToolbarLayout with TabLayout
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
@katowulf
katowulf / gist:4741111
Last active July 13, 2024 20:23
Firebase security rules for a simple chat room model
{
"chat": {
// the list of chats may not be listed (no .read permissions here)
// a chat conversation
"$key": {
// if the chat hasn't been created yet, we allow read so there is a way
// to check this and create it; if it already exists, then authenticated
// user (specified by auth.id) must be in $key/users