Skip to content

Instantly share code, notes, and snippets.

@chbrown
chbrown / GrasswireUrlShortener.errors
Created August 21, 2014 16:43
`scala GrasswireUrlShortener.scala` result
/Users/chbrown/Desktop/GrasswireUrlShortener.scala:3: error: object apache is not a member of package org
import org.apache.commons.validator.routines.UrlValidator
^
/Users/chbrown/Desktop/GrasswireUrlShortener.scala:4: error: not found: value spray
import spray.http.StatusCodes
^
/Users/chbrown/Desktop/GrasswireUrlShortener.scala:5: error: not found: value spray
import spray.routing._
^
/Users/chbrown/Desktop/GrasswireUrlShortener.scala:7: error: not found: value scalaz
@chbrown
chbrown / bit.ly.webloc
Created August 21, 2014 16:49
URL shortener in one line of URLs
http://bit.ly/

First traceroute runs

root@(none):~# traceroute index.docker.io

traceroute to index.docker.io (162.242.195.84), 30 hops max, 60 byte packets
 1  178.62.0.253 (178.62.0.253)  6.960 ms  6.943 ms  6.914 ms
 2  5.101.111.229 (5.101.111.229)  0.323 ms 5.101.111.237 (5.101.111.237)  0.307 ms  0.293 ms
 3  212.119.29.53 (212.119.29.53)  0.707 ms  0.706 ms  0.728 ms
 4  ae-6.r02.londen03.uk.bb.gin.ntt.net (129.250.3.2)  1.777 ms ae-1.r02.londen01.uk.bb.gin.ntt.net (129.250.3.36)  1.906 ms  1.753 ms

5 ae-6.r02.londen03.uk.bb.gin.ntt.net (129.250.3.2) 1.974 ms 1.912 ms 2.048 ms

@chbrown
chbrown / the-dog-bit-a-girl.xml
Last active August 29, 2015 14:16
TreeForm output
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<sentence defaultfontsize="10" file="/Users/chbrown/github/tree-js/tmp/the-dog-bit-a-girl.xml" lefttranslate="20" linelength="10" mintextwidth="30" name="the-dog-bit-a-girl.xml" toptranslate="20" type="TreeForm">
<syntacticstructure lineblue="0" linegreen="0" linered="0" string="13165790" syntacticlevel="HEAD">
<text text="S ">
<N0 backgroundblue="255" backgroundgreen="255" backgroundred="255" font="Dialog" foregroundblue="0" foregroundgreen="0" foregroundred="0" size="10" strikethrough="false" style="0" subscript="normal" underline="false"/>
<N1 font="Dialog" size="10" style="0" subscript="normal"/>
</text>
<syntacticfeaturesets/>
<syntacticassociations/>
<starttraces/>
@chbrown
chbrown / Instructions.md
Created June 25, 2015 02:46
Installing TypeScript-Sublime-Plugin at 0.1.4
  1. First, uninstall the PackageControl-installed version: Command+Shift+P -> Remove -> Typescript

  2. In your terminal: cd "$HOME/Library/Application Support/Sublime Text 3/Packages/"

  3. In that directory: git clone https://github.com/Microsoft/TypeScript-Sublime-Plugin.git TypeScript

    This is pretty much the source-install process from the plugin's readme, except without --depth 1, which pulls only the latest revision.

  4. Go into the repository: cd TypeScript

  5. And checkout the latest good version: git checkout 0.1.4

  6. Quit Sublime Text and restart

@chbrown
chbrown / ICANN.md
Created June 26, 2015 00:09
ICANN campaign

Call ICANN in Los Angeles at +1 (310) 301 5800

They must not have a lot of staff or usually get a lot of calls, though, because all I got was a busy signal.

But if you get through to them, tell them (this is the verbiage from NameCheap):

Regarding the proposed rules governing companies that provide WHOIS privacy services (as set forth in the Privacy and Policy Services Accreditation Issues Policy document):

I urge you to respect internet users' rights to privacy and due process.

  • Everyone deserves the right to privacy.
diff -r c07cda5335f1 tg/dottednamesupport.py
--- a/tg/dottednamesupport.py Sun Nov 29 14:41:33 2009 -0700
+++ b/tg/dottednamesupport.py Fri Jan 08 10:03:10 2010 -0600
@@ -59,16 +59,23 @@
"""
if uri.startswith('local:'):
- uri = uri.replace('local:', tg.config['pylons.package']+'.')
+ package = tg.config['pylons.package']
+ if relativeto:
10:31:10 AM Christopher Brown: You ever looked at the staff member stuff?
10:31:23 AM mvp-devs: Lee McFadden: no, i haven't.
10:32:59 AM Christopher Brown: Right now it's not very DRY, and I wanted to see what you guys thought of refactoring it.
10:33:09 AM mvp-devs: Lee McFadden: need another set of eyes on the code for something?
10:33:11 AM mvp-devs: Lee McFadden: ah.
10:33:48 AM Christopher Brown: Replace TeamStaff, ContestStaff, VenueStaff (and I think there's one other XStaff) with StaffPosition, which has a many to many on Resource.
10:34:07 AM Christopher Brown: Team, Contest, Venue are all Resources.
10:34:27 AM mvp-devs: Lee McFadden: that sounds pretty logical to me
10:35:04 AM Christopher Brown: Right now TeamStaff has a team_id field, Contest the same, Venue has a many2many on venues.
10:35:33 AM mvp-devs: Lee McFadden: would have to ask CP though for a definitive answer. it's more of a judgement call really. If refactoring is going to be a major benefit in flexibility then I say go for it.
#441 - 1 hr -
#445 - 20 hr - Large (new module). Need to discuss extensively before diving in.
#577 - 2 hr - 1/2 done. Other half will be quick.
#556 - XX hr - This needs a lot of explanation. Is the whole stats system going to be user configurable. This could be a huge ordeal in that case.
#422 - 2 hr - In place, need configurable settings to get around in tests / sites that don't want it.
#439 - 4 hr
#456 - 2 hr - Just like staff position checking but on a different model. Easy. Low priority -- I resurrected the ticket from a dontfix.