Skip to content

Instantly share code, notes, and snippets.

@mm53bar
mm53bar / Zip Codes to DMAs
Created August 10, 2023 17:37 — forked from clarkenheim/Zip Codes to DMAs
TSV file containing zip codes and the DMA they fall in to. Method: calculate the centre point of every zip code geo boundary, plot those points on a DMA boundary map, find the containing DMA of each zip centroid
This file has been truncated, but you can view the full file.
zip_code dma_code dma_description
01001 543 SPRINGFIELD - HOLYOKE
01002 543 SPRINGFIELD - HOLYOKE
01003 543 SPRINGFIELD - HOLYOKE
01004 543 SPRINGFIELD - HOLYOKE
01005 506 BOSTON (MANCHESTER)
01007 543 SPRINGFIELD - HOLYOKE
01008 543 SPRINGFIELD - HOLYOKE
01009 543 SPRINGFIELD - HOLYOKE
01010 543 SPRINGFIELD - HOLYOKE
@mm53bar
mm53bar / obsidian.css
Created January 22, 2021 15:19 — forked from pihentagy/obsidian.css
Clutter free edit mode
/* inline formatting, link targets and [[ ]] disappears if not active line*/
div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-formatting,
div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-string.cm-url,
div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-formatting-link,
div:not(.CodeMirror-activeline)>.CodeMirror-line span.cm-hmd-barelink,
div:not(.CodeMirror-activeline)>.CodeMirror-line span.cm-comment
{ display: none; }
/* hide all html tags -- IT IS COMMENTED OUT BY DEFAULT */
/* div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-tag{ display: none; } */
@mm53bar
mm53bar / obsidian.css
Created May 21, 2020 15:22 — forked from seanwcom/obsidian.css
Bear.app stylings for Obsidian
/* Font for the markdown source panel */
div.markdown-source-view {
font-family: 'Avenir Next'
}
/* Font for the markdown preview panel */
div.markdown-preview-view {
font-family: 'Avenir Next'
}
@mm53bar
mm53bar / wordlist.txt
Created April 12, 2019 20:54 — forked from stevepaulo/wordlist.txt
Mnemonic word list for server names, release names, etc... solve the "hard problem" of naming things
From http://web.archive.org/web/20090918202746/http://tothink.com/mnemonic/wordlist.html
Word selection criteria:
- The wordlist contains 1626 words.
- All words are between 4 and 7 letters long.
- No word in the list is a prefix of another word (e.g. visit, visitor).
- Five letter prefixes of words are sufficient to be unique.
The rest of the criteria are less strict. You may find exceptions to all of them because it is difficult to satisfy them all at the same time.
- The words should be usable by people all over the world. The list is far from perfect in that respect. It is heavily biased towards western culture and English in particular. The international vocabulary is simply not big enough. One can argue that even words like "hotel" or "radio" are not truly international. You will find many English words in the list but I have tried to limit them to words that are part of a beginner's vocabulary or words that have close relatives in other european languages. In some cases a word has a different meaning
@mm53bar
mm53bar / words.md
Created September 7, 2018 18:57 — forked from fogleman/words.md
Mnemonic Encoding Word List

Mnemonic Encoding Word List

http://web.archive.org/web/20090918202746/http://tothink.com/mnemonic/wordlist.html

  • The wordlist contains 1626 words.
  • All words are between 4 and 7 letters long.
  • No word in the list is a prefix of another word (e.g. visit, visitor).
  • Five letter prefixes of words are sufficient to be unique.
  • The words should be usable by people all over the world. The list is far from perfect in that respect. It is heavily biased towards western culture and English in particular. The international vocabulary is simply not big enough. One can argue that even words like "hotel" or "radio" are not truly international. You will find many English words in the list but I have tried to limit them to words that are part of a beginner's vocabulary or words that have close relatives in other european languages. In some cases a word has a different meaning in another language or is pronounced very differently but for the purpose of the encoding it is still ok - I assume that when the encoding is
@mm53bar
mm53bar / hex.md
Created April 27, 2016 19:50 — forked from krisleech/hex.md
Hexagonal Rails

Entity

class Bid < ActiveRecord::Base
  belongs_to :buyer, class_name: Customer
  
  def self.from_form(form)
    new(form.attributes)
  end
end
require 'octokit'
require 'csv'
require 'date'
# Github credentials to access your private project
USERNAME="USER_NAME"
PASSWORD="SEKRIT"
# Project you want to export issues from
USER="REPO_OWNER"
PROJECT="REPO_NAME"
@mm53bar
mm53bar / README.md
Last active December 11, 2015 05:28 — forked from mynameisrufus/db_backup.sh
Stop using Ruby to back up the postgres database in your Rails app. Use bash instead!

Backing up Postgres with Bash

Stop using Ruby to back up the postgres database in your Rails app. Use bash instead!

##Install:

cd /usr/local/bin
git clone https://gist.github.com/4552332.git db_backup

chmod +x db_backup/db_backup.sh

[alias]
stage = !sh -c '[[ -z "$@" ]] && git add -u || git add "$@" && git add -u "$@" ' -
unstage = reset HEAD --
rewind = ![[ -z "$@" ]] && git reset --hard HEAD || git checkout HEAD