This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for thefile in `find <path to start from> -type f -name <filename pattern>` ; do | |
| grep -v "<text to be removed (affects whole line)>" $thefile > $thefile.$$.tmp | |
| mv $thefile.$$.tmp $thefile | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ps -e -orss=,args= | sort -b -k1,1n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dbms.mode=CORE | |
| dbms.connector.bolt.listen_address=:7691 | |
| dbms.connector.http.listen_address=:7481 | |
| dbms.connector.https.listen_address=:7371 | |
| causal_clustering.initial_discovery_members=localhost:5001,localhost:5002,localhost:5003 | |
| causal_clustering.discovery_listen_address=127.0.0.1:5001 | |
| causal_clustering.transaction_listen_address=:6001 | |
| causal_clustering.raft_listen_address=:7001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //LOAD CSV script for GFTS data | |
| create constraint on (a:Agency) assert a.id is unique; | |
| create constraint on (r:Route) assert r.id is unique; | |
| create constraint on (t:Trip) assert t.id is unique; | |
| create index on :Trip(service_id); | |
| create constraint on (s:Stop) assert s.id is unique; | |
| create index on :Stoptime(stop_sequence); | |
| create index on :Stop(name); | |
| schema await |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.scalatest.FlatSpec | |
| class FooSpec extends FlatSpec { | |
| "foo" should "bar" in { | |
| val it = Iterator.continually(List[Int]()).flatten | |
| assert(it.next() == 0) | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def tree(height, with_star = true) { | |
| if (with_star) println(" " * (left_padding(height, 0) - 1) + "*") | |
| (1..height).each { | |
| ring(it, height) | |
| } | |
| println(" " * (left_padding(height, 0) - 1) + "X") | |
| } | |
| def ring(from_top, height) { | |
| println(" " * left_padding(height, from_top) + "X" * (2 * from_top - 1)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Stumbling across Rational and Complex for the first time while working with Date/DateTime, | |
| found asking myself: Is there some area for work on these in MRI? | |
| Here is what Ruby Doc says for the Rational class | |
| Rational(-4) ** Rational(1,2) #=> (1.2246063538223773e-16+2.0i) | |
| And here is what my local installation of Ruby 2.0.0 says (same for 1.8.7 and 1.9.3, all on OSX 10.7) | |
| Rational(-4) ** Rational(1,2) #=> (1.2246467991473532e-16+2.0i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Originally: | |
| https://gist.github.com/7565976a89d5da1511ce | |
| Hi Donald (and Martin), | |
| Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I | |
| appreciate the tone. This is a Yegge-long response, but given that you and | |
| Martin are the two people best-situated to do anything about this, I'd rather | |
| err on the side of giving you too much to think about. I realize I'm being very | |
| critical of something in which you've invested a great deal (both financially |