Skip to content

Instantly share code, notes, and snippets.

View emo-eth's full-sized avatar

James emo-eth

View GitHub Profile
@fiveoutofnine
fiveoutofnine / 1_example-glyphs.txt
Last active June 17, 2024 20:43
Quick snippets/tutorial on how to condense a font by selecting a subset of characters. First, create a `.txt` file with the characters (as unicode chars) you want included.
U+0039
U+003A
U+002F
U+0023
U+0050
U+0075
U+007A
U+006C
U+0065
U+0041
@hrkrshnn
hrkrshnn / generic.org
Last active April 21, 2024 01:51
Some generic writeup about common gas optimizations, etc.

Upgrade to at least 0.8.4

Using newer compiler versions and the optimizer gives gas optimizations and additional safety checks for free!

The advantages of versions 0.8.* over <0.8.0 are:

  • Safemath by default from 0.8.0 (can be more gas efficient than some library based safemath).
  • Low level inliner from 0.8.2, leads to cheaper runtime gas. Especially relevant when the contract has small functions. For
@kylemcdonald
kylemcdonald / 1m-analysis.ipynb
Created August 6, 2017 17:01
Histogram analysis of the 1 million song dataset.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Kcnarf
Kcnarf / .block
Last active December 3, 2018 08:26
Voronoï playground : undulating radial wave
license: gpl-3.0
border: no
@Kcnarf
Kcnarf / .block
Last active April 11, 2017 14:08
Voronoï playground - Do you see the path ?
license: gpl-3.0
@veltman
veltman / README.md
Last active December 20, 2018 08:35
Electoral cartograms
@pathikrit
pathikrit / README.md
Last active April 24, 2021 17:36
My highly opinionated list of things needed to build an app in Scala
@pchhetri
pchhetri / README.md
Last active July 16, 2024 21:24
OS X iMessage (Messages) database merger

OS X iMessage (Messages) database merger

Use it at your own risk! You might end up worse than before. Backup everything beforehand. Twice.

If you have the Messages app setup in multiple Macs with the same Apple ID you may end up with iMessages (or SMS) scattered around all of these Macs. This is because after a certain time the new iMessages (or SMS) recevied will cease to push to devices afer a certain time has elapsed. Thus, if a computer has been offline for some period of time it won't get the new iMessages.

Each Messages instance stores the information in a SQLite database, to consolidate all these databases run the script below. This is where the Messages app stores the SQLite database under ~/Library/Messages, the folder contents will look like as follows:

  • chat.db
@mbostock
mbostock / .block
Last active July 4, 2016 13:46
ColorBrewer Spline
license: gpl-3.0
height: 620
@dannguyen
dannguyen / algorithm-for-nyt-algorithms.README.md
Last active November 23, 2020 13:30
My algorithm to find readings about algorithms (from the New York Times articlesearch API)

Algorithm to find readings about algorithms

(as found among published New York Times articles)

The file fetch_nyt_articlesearch_api.py is a Python 3.4+ (w/ Requests) script that queries for the New York Times articlesearch.v2 API for all articles containing "algorithms" as a subject and more than 700 words.

  • Saves each time period of articles as a JSON file.
  • Requires a NYT developers API key for articlesearch API: developer.nytimes.com/signup
  • requires an environmental variable, NYT_ARTICLE_SEARCH_KEY

The script is hardcoded to fetch results from 1800 to today (2016-05-24), which returns 1,653 results.