Skip to content

Instantly share code, notes, and snippets.

View dmpeters's full-sized avatar
👨‍🔧

David Peters dmpeters

👨‍🔧
View GitHub Profile
@dmpeters
dmpeters / gist:3195360
Created July 29, 2012 00:04
homebrew issues with git and pkg-config after installing mountain lion osx 10.8
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
_reencode_string in libgit.a(utf8.o)
_reencode_string in libgit.a(utf8.o)
"_iconv_close", referenced from:
"_iconv_close", referenced from:
_reencode_string in libgit.a(utf8.o)
Undefined symbols for architecture x86_64:
@dmpeters
dmpeters / librets_ubuntu_recipe.txt
Last active October 15, 2018 01:11
librets ubuntu recipe
spin up vagrant precise64
sudo apt-get update && sudo apt-get install build-essential
### librets
sudo apt-get install libexpat1-dev libcurl3-dev libboost-dev libboost-filesystem-dev antlr antlr3 libantlr-dev swig libboost-program-options-dev python-dev
wget http://www.crt.realtors.org/projects/rets/librets/files/librets-1.5.3.tar.gz
<?xml version="1.0" encoding="UTF-8"?>
<RETS ReplyCode="0" ReplyText="Operation successful.">
<METADATA>
<METADATA-RESOURCE Version="01.72.10255" Date="2013-02-06T21:22:33" System="BAK">
<Resource>
<ResourceID>ActiveAgent</ResourceID>
<StandardName>ActiveAgent</StandardName>
<VisibleName>Active Agent Search</VisibleName>
<Description>Contains information about active agents.</Description>
<KeyField>MemberNumber</KeyField>
@dmpeters
dmpeters / regex guide
Created February 11, 2013 21:39
a simple regex table for later reference.
_Symbol_ _Description_
. Any single character
\d Any single digit
[A-Z] Any character between A and Z (uppercase)
[a-z] Any character between a and z (lowercase)
[A-Za-z] Any character between a and z (case-insensitive)
+ One or more of the previous expression (for example, \d+ matches one or more digits)
[^/]+ One or more characters until (and not including) a forward slash
? Zero or one of the previous expression (for example, \d? matches zero or one digits)
* Zero or more of the previous expression (for example, \d* matches zero, one or more than one digit)
@dmpeters
dmpeters / elasticsearch_notes.md
Created February 25, 2013 00:33
Hacker News - February Meetup - elasticsearch Notes

Hacker News - February Meetup

elasticsearch notes

What is elasticsearch

  • a way to search... things
  • way to search data in terms of naturla language and mocuh more...
  • distributed JSON API
  • fancy cluster

What is lucene?

@dmpeters
dmpeters / salt_osx_setup.md
Created March 25, 2013 01:57
getting started with salt on osx

getting started with salt

a little adventurous tale of setting up salt on osx...

salt osx docs: http://goo.gl/E6ZtA

overall, seemed pretty straight forward...(?)

  • preliminary steps:
    • brew update (I did this to make sure I was up to date)
    • brew upgrade (I did this to upgrade what I was not up to date with)
  • brew doctor (I did this to make sure I was 'raring to brew')
@dmpeters
dmpeters / cable_modem.md
Created March 25, 2013 04:48
Ambit Cable Modem Model: U10C018

Ambit Cable Modem Model: U10C018

Login Details: Web Address: http://192.168.100.1/

User: Username - user Password - user

Admin:

@dmpeters
dmpeters / bulk_index
Last active December 15, 2015 14:59
elastic search log and confusion
pyelasticsearch: DEBUG: Making a request equivalent to this: curl -XPOST 'http://localhost:9200/_bulk?op_type=create' -d '{"index": {"_type": "player", "_index": "nba"}}
{"college": "Lanier HS/USA", "name": "Monta Ellis", "weight": 185, "years_pro": 7, "dob": "10/26/1985", "position": "G", "team": "Bucks", "number": 11, "height": "6-3"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "FC Barcelona/Turkey", "name": "Ersan Ilyasova", "weight": 235, "years_pro": 4, "dob": "05/15/1987", "position": "F", "team": "Bucks", "number": 7, "height": "6-10"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "Colorado/USA", "name": "Chauncey Billups", "weight": 210, "years_pro": 15, "dob": "09/25/1976", "position": "G", "team": "Clippers", "number": 1, "height": "6-3"}
{"index": {"_type": "player", "_index": "nba"}}
{"college": "Kentucky/USA", "name": "Eric Bledsoe", "weight": 195, "years_pro": 2, "dob": "12/09/1989", "position": "G", "team": "Clippers", "number": 12, "height": "6-1"}
{"index": {"_ty
@dmpeters
dmpeters / git_tips.md
Last active December 17, 2015 02:38
Git Tips & Tricks
@dmpeters
dmpeters / fizzbuzz.js
Last active December 17, 2015 20:58
codersumo fizzbuzz in several languages
for(var i=1; i<=100; i++){
if (i % 15 == 0) {
print('FizzBuzz');
}
else if (i % 5 == 0) {
print('Buzz');
}
else if (i % 3 == 0) {
print('Fizz');
}