Skip to content

Instantly share code, notes, and snippets.

View emjayoh's full-sized avatar

Matt Ogram emjayoh

View GitHub Profile
@lsloan
lsloan / v1p0p0.php
Created April 19, 2019 15:51
Parse hangouts.json from Google Takeout, via https://paste.jay2k1.com/view/5fcebdfe
<?php
/*
(in this version, I added support for more message types and offer both plaintext and HTML message format)
This is a function that transforms the JSON you get from Google Takeout when you export your Hangouts history
into a PHP array which can be used to further manipulate the data.
A use case is my hangouts parser at http://hangoutparser.jay2k1.com/ -- a description can be seen at
http://blog.jay2k1.com/2014/11/10/how-to-export-and-backup-your-google-hangouts-chat-history/
@EduVencovsky
EduVencovsky / Auth.jsx
Last active June 27, 2024 07:58
Private Routes with Auth using react-router and Context API
import React, { useState, useEffect } from 'react'
import PropTypes from 'prop-types'
import { checkIsAuthenticated, authSignUp, authLogin, authLogout } from '../../services/auth'
export const AuthContext = React.createContext({})
export default function Auth({ children }) {
const [isAuthenticated, setIsAuthenticated] = useState(false)
const [isLoading, setIsLoading] = useState(true)
@LukeMwila
LukeMwila / auth.ts
Created August 25, 2019 17:25
Helper functions for sign up and sign in logic with AWS Cognito
import * as React from "react";
import {
AuthenticationDetails,
CognitoUserPool,
CognitoUserAttribute,
CognitoUser,
CognitoUserSession,
} from "amazon-cognito-identity-js";
import moment from "moment";
/** Utils */
ln -s "/Users/`whoami`/Google Drive/alfred/snippets" "/Users/`whoami`/Library/Application Support/Alfred/Alfred.alfredpreferences/snippets"
ln -s "/Users/`whoami`/Google Drive/alfred/themes" "/Users/`whoami`/Library/Application Support/Alfred/Alfred.alfredpreferences/themes"
@purneshwar
purneshwar / hangouts.py
Created April 28, 2020 23:28 — forked from naptar/hangouts.py
Convert/Parse Google Takeout/Export Data Hangouts/Chat into individual conversations
# Run this in the same directory as the Hangouts.json file generated by Google Takeout / Data Export tool.
# python3 hangouts.py
import json
import datetime
import os
import shutil
import re
chat_dir = "hangouts"