Skip to content

Instantly share code, notes, and snippets.

@gnprice
gnprice / fonts.conf
Created August 7, 2017 21:25
Noto CJK font fix
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
Problem: After installing the Noto fonts (on my Debian `stretch`
system, with `apt install fonts-noto`), Japanese text in my
browser ends up displayed in the "Medium" style of the font
rather than the "Regular" style. The "Medium" style is too
heavy for normal text.
@hubgit
hubgit / extract.js
Last active October 26, 2020 16:43
Tweeted Threes scores
// https://twitter.com/search?q=%22i%20just%20scored%22%20%22@threesgame%22&f=realtime'
var scores = EAT.extract(['.stream-items .tweet', {
text: '.tweet-text',
name: '.fullname',
username: '.username',
date: function(item) {
return item.querySelector('.tweet-timestamp span').getAttribute('data-time')
}
}]).map(function(tweet) {
@ptwobrussell
ptwobrussell / gist:668166
Created November 8, 2010 19:52
Visualizing Twitter Search Results:
Visualizing Twitter Search Results with Protovis and/or Graphviz is this easy:
$ easy_install twitter # See https://github.com/sixohsix/twitter and http://pypi.python.org/pypi/setuptools
$ git clone https://github.com/ptwobrussell/Mining-the-Social-Web.git
$ cd Mining-the-Social-Web/python_code
$ python introduction__retweet_visualization.py TeaParty # or whatever you want to search for
Your browser should pop open and display the results as a force directed graph, but also check your console for some useful output.
You can create an image file from the DOT language output with a command like the following: