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
| === avg diet before I started with this vegan shit === | |
| breakfast: 2 eggs, yoghurt, juice | |
| snack: smoothie with whatever frozen fruit we have around, juice, and whey protein | |
| lunch: big bowl steamed broccoli and tofu, plain or with a bit of soy sauce | |
| snack: almonds, peanuts, or whatever other nuts I have around + fruit | |
| pre-workout carbs: whole wheat pasta with some pesto and parmesan | |
| dinner: big salad: spinach, lettuce, chopped nuts, etc | |
| === workouts === |
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
| (gdb) backtrace | |
| #0 0x0000000000000000 in ?? () | |
| #1 0x000000010015b228 in obj_dump (obj=4417744840, gen=0x1154e5ba0) at memprof.c:779 | |
| #2 0x000000010015ceb2 in memprof_dump_all (argc=<value temporarily unavailable, due to optimizations>, argv=<value temporarily unavailable, due to optimizations>, self=<value temporarily unavailable, due to optimizations>) at memprof.c:1562 | |
| #3 0x000000010001f8f6 in rb_call0 (klass=4331570480, recv=4331570680, id=11041, oid=11041, argc=1, argv=0x7fff5fbebbc0, body=0x1022e8328, flags=<value temporarily unavailable, due to optimizations>) at eval.c:6048 | |
| #4 0x00000001000204b5 in rb_call (klass=4331570480, recv=4331570680, mid=11041, argc=1, argv=0x7fff5fbebbc0, scope=0, self=4588278280) at eval.c:6297 | |
| #5 0x0000000100029ac7 in eval_call (self=4588278280, node=0x1119a9d60) at eval.c:3379 | |
| #6 0x000000010001ff4e in rb_call0 (klass=4588350360, recv=4588278280, id=4553, oid=4553, argc=0, argv=0x7fff5fbec218, body=0x1119a9cc0, flags=<value temporarily unavailable, due to optimizations |
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
| require 'syntax/convertors/html' | |
| require 'uv' | |
| module Code | |
| BACKGROUND_COLOR = '#2B2B2B' | |
| COLOR = '#E6E1DC' | |
| COLORS = { | |
| :keyword => '#CC7833', | |
| :symbol => '#6E9CBE', | |
| :constant => '#DA4939', |
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
| #!/usr/local/bin/thrift --java --php --py | |
| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.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
| 13247 redis 15 0 7802m 7.5g 360 S 0.0 64.1 194:43.27 redis-server |
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
| implicit def columnMap2Map[A, B](map: Map[Array[Byte], Array[Byte]]) | |
| (implicit f: Array[Byte] => A, g: Array[Byte] => B): Map[A, B] = { | |
| map.foldLeft(Map[A, B]()) { case(map, (k, v)) => | |
| val tuple = (k: A, v: B) | |
| map + tuple | |
| } | |
| } | |
| implicit def byteArray2UUID(bytes: Array[Byte]): UUID = UUID.valueOf(bytes) | |
| implicit def byteArray2String(bytes: Array[Byte]): String = new String(bytes) |
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
| implicit def map2ColumnMap[A <% Array[Byte], B <% Array[Byte]](map: Map[A, B]): | |
| Map[Array[Byte], Array[Byte]] = { | |
| map.foldLeft(Map[Array[Byte], Array[Byte]]()) { (map, kv) => | |
| map + Tuple2[Array[Byte], Array[Byte]](kv._1, kv._2) | |
| } | |
| } |
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
| >> puts Benchmark.measure { 1000.times { "abcdefg" =~ /a/ } } | |
| 0.000000 0.000000 0.000000 ( 0.000748) | |
| => nil | |
| >> puts Benchmark.measure { 1000.times { "abcdefg" =~ /a/ } } | |
| 0.000000 0.000000 0.000000 ( 0.000743) | |
| => nil | |
| >> puts Benchmark.measure { 1000.times { "abcdefg" =~ /a/ } } | |
| 0.000000 0.000000 0.000000 ( 0.000715) | |
| => nil | |
| >> puts Benchmark.measure { 1000.times { "abcdefg" =~ /a/ } } |
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 self.clean(string) | |
| if expression = valid_character | |
| stripped = []; for c in string.split(//) | |
| stripped << c if expression.match(c) | |
| end; stripped.join | |
| else | |
| string | |
| end | |
| end |
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
| /Users/james/.gem/ruby/1.8/gems/cassandra-0.7.5/lib/cassandra/columns.rb:98:in `initialize': can't convert Symbol into String (TypeError) | |
| from /Users/james/.gem/ruby/1.8/gems/cassandra-0.7.5/lib/cassandra/columns.rb:98:in `new' | |
| from /Users/james/.gem/ruby/1.8/gems/cassandra-0.7.5/lib/cassandra/columns.rb:98:in `hash_to_cfmap' | |
| from /Users/james/.gem/ruby/1.8/gems/thrift-0.0.810255.1/lib/thrift/transport/socket.rb:47:in `collect' | |
| from /Users/james/.gem/ruby/1.8/gems/cassandra-0.7.5/lib/cassandra/columns.rb:95:in `each' | |
| from /Users/james/.gem/ruby/1.8/gems/cassandra-0.7.5/lib/cassandra/columns.rb:95:in `collect' | |
| from /Users/james/.gem/ruby/1.8/gems/cassandra-0.7.5/lib/cassandra/columns.rb:95:in `hash_to_cfmap' | |
| from /Users/james/.gem/ruby/1.8/gems/cassandra-0.7.5/lib/cassandra/cassandra.rb:106:in `insert' | |
| from test.rb:5 |