Skip to content

Instantly share code, notes, and snippets.

View hyfen's full-sized avatar
💭
Building a Memex

Andrew Louis hyfen

💭
Building a Memex
View GitHub Profile
@dwf
dwf / msnlog.py
Created February 1, 2010 21:04
A script that dumps convoluted XML log files from MSN Messenger to readable plaintext.
"""
Simple script I whipped up to dump MSN Messenger logs in XML to a readable
plaintext format. It's not very robust, nor am I sure which versions of MSN
Messenger it's compatible or incompatible with; I just had a specific
conversation I wanted to read, and this was the vehicle to that end.
By David Warde-Farley -- user AT cs dot toronto dot edu (user = dwf)
Redistributable under the terms of the 3-clause BSD license
(see http://www.opensource.org/licenses/bsd-license.php for details)
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@GregBaugues
GregBaugues / token.rb
Last active July 11, 2022 02:21
Google API OAuth 2.0 refresh token (Ruby on Rails)
# The OAuth access token provided by the Google API expires in 60 minutes. After expiration,
# you must exchange a refresh token for a new access token. Unfortunately, the the Google API
# ruby gem does not include a method for refreshing access tokens.
# You can read up on how to refresh an access token here:
# https://developers.google.com/accounts/docs/OAuth2WebServer#refresh
# This Token model implements that process. It's based off of a Token model that can be created
# by running:
# rails g model Token token:text refresh_token:string expires_at:datetime
@dropmeaword
dropmeaword / browser_history.md
Last active July 19, 2024 00:09
Playing around with Chrome's history

Browser histories

Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.

The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.

Finder

Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.

@dannguyen
dannguyen / shakespeare-ngrams-cli-ack.md
Last active May 30, 2023 16:04
How to tokenize and create n-grams in Shakespeare from the command-line

Creating Shakespearean n-grams with just the command-line and regexes

This is a quick example showing how to use regexes to find tri-grams in Shakespeare...well, 570,872 of them, anyway, if we do some basic filtering of non-dialogue.

Though tokenization and n-grams should typically be done using a proper natural language processing framework, it's possible to do in a jiffy from the command-line, using standard Unix tools and ack, the better-than-grep utility.

What are n-grams?

@aparrish
aparrish / spacy_intro.ipynb
Last active August 9, 2023 01:41
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sometimes there's a terrible penalty for telling the truth.
—The Great Lie (1941)
Sometimes even Cupid needs a little help!
—The Model and the Marriage Broker (1951)
Sometimes any man can be a giant . . .
—Giant (1956)
Sometimes murder is just a way to pass the time.
@ruthienachmany
ruthienachmany / gist:03f9a9241dfb2b050cbc93e4781472ce
Last active June 9, 2020 17:57
Biomaterials as UI: Designing New User Experiences // Strangeloop Talk // Resources to Learn More
https://www.thestrangeloop.com/2017/biomaterials-designing-new-user-experiences.html
BIOMATERIALS: DESIGNING NEW USER EXPERIENCES
As software developers, we build for the capabilities of the platform our customer consumes our software on.
While we can easily imagine the ways the gyroscope or haptic abilities of a smartphone shape what we build for mobile,
or the intent structure of a Google Home or Alexa app defines what we build for voice, as a software engineer at Warby Parker
I've observed the opportunity for software developers to consider the material of the products our companies sell as another
plane for creative technology and enhanced user experience. In this talk, I share some exciting trends in biomaterials:
materials derived from nature or synthetically produced materials that are inspired by nature. I offer a look at some unique
properties of these materials in the hope of inspiring people to explore the ways they can hack on these
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

It had been 13 days since I'd found a spreader, and I was starting to get worried.

The last time my sero levels had been this low, I'd gone down to the arrivals level of the international terminal at the airport. I mean, obviously there wouldn't be any spreaders there unless someone screwed up the pre-flight screening. But they say that low viral loads of unfamiliar strains could still boost you in a pinch, so I scanned the room for the most exotic-looking passengers I could find and tried to cozy up to them. Once, I managed to lick the handles of a few suitcases going around the carousel without too many people noticing.

Anyway, I guess what they say is true, because my sero bounced up. But I think I got lucky; there's no substitute for prolonged contact with someone who's gone full sympto.

I texted my doctor again.

ffs you're literally killing me here