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
| 10:30 jamesgolick: right, but Friendly::UUID can't be mapped to a method | |
| 10:31 jeremyevans: jamesgolick: Nope. You can see the implemention if you want to know why | |
| 10:31 jamesgolick: yeah, i've looked... was wondering if there was something I missed | |
| 10:31 jamesgolick: ok... i guess we'll have to subclass | |
| 10:31 jeremyevans: jamesgolick: It would be possible to support column :user_id, Friendly::UUID, but not Friendly::UUID :user_id | |
| 10:32 jamesgolick: oh | |
| 10:32 jamesgolick: how do I support the former | |
| 10:33 jeremyevans: jamesgolick: Add a type_literal_generic_friendly::uuid method to the database | |
| 10:34 jamesgolick: badass | |
| 10:34 jamesgolick: we'll just have ot shift around the way we're doing things |
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
| >> h = Hash.new { |hash, k| h[k] = [] } | |
| => {} | |
| >> h = Hash.new(1) | |
| => {} | |
| >> h[1] | |
| => 1 | |
| >> h | |
| => {} |
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
| ><script | |
| type="text/javascript"> | |
| alert('xss') | |
| </script | |
| > |
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
| /* | |
| * ==================================================================== | |
| * 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 | |
| * |
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
| [james@james-golicks-macbook friendly (master)]$ git diff --stat v0.4.3 v0.4.4 | |
| CHANGELOG.md | 5 + | |
| VERSION | 2 +- | |
| friendly.gemspec | 20 ++-- | |
| lib/friendly/attribute.rb | 11 ++- | |
| lib/friendly/config.rb | 5 - | |
| lib/friendly/data_store.rb | 3 +- | |
| lib/friendly/document.rb | 209 ++----------------------------- | |
| lib/friendly/document/associations.rb | 50 ++++++++ | |
| lib/friendly/document/attributes.rb | 114 +++++++++++++++++ |
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
| [root@util ~]# ps aux | grep redis | |
| root 9428 0.0 0.0 61172 740 pts/0 S+ 12:47 0:00 grep redis | |
| root 14393 0.0 0.0 3660 356 ? Ss 07:00 0:00 runsv redis | |
| root 14396 0.2 3.0 128600 125412 ? S 07:00 0:46 /opt/redis/redis-server /etc/redis.conf | |
| [root@util ~]# strace -p 14396 | |
| Process 14396 attached - interrupt to quit | |
| write(1, "19 Jan 18:42:48 - 100 changes in"..., 55 |
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
| Java Logging is Awesome | |
| ======================= | |
| ### Since I am incapable of determining information about my own runtime environment, please provide it to me. Also, this is from a *library* and there's no obvious way to turn it off, rendering DEBUG logging statements from my own application all but useless. | |
| DEB [20100119-17:50:05.225] httpclient: Java version: 1.6.0_15 | |
| DEB [20100119-17:50:05.225] httpclient: Java vendor: Apple Inc. | |
| DEB [20100119-17:50:05.226] httpclient: Java class path: /Users/james/bin/sbt-launcher.jar | |
| DEB [20100119-17:50:05.226] httpclient: Operating system name: Mac OS X | |
| DEB [20100119-17:50:05.226] httpclient: Operating system architecture: x86_64 |
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
| [root@master2 ~]# ll foo/ | |
| total 0 | |
| [root@master2 ~]# ll bar/ | |
| total 12 | |
| -rw-r--r-- 1 root root 0 Jan 21 16:45 baz | |
| drwxr-xr-x 2 root root 4096 Jan 21 16:45 dirinbar | |
| [root@master2 ~]# cp -R bar/* foo/ | |
| [root@master2 ~]# ll foo/ | |
| total 12 | |
| -rw-r--r-- 1 root root 0 Jan 21 16:46 baz |
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
| sub send_arp($$) { | |
| my $if = shift; | |
| my $ip = shift; | |
| if ($OSNAME eq 'linux') { | |
| my $mac = ''; | |
| if ($Net::ARP::VERSION < 1.0) { | |
| Net::ARP::get_mac($if, $mac); | |
| } |
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
| [james@james-golicks-macbook redis_control (master)]$ wget http://gemcutter.org/gems/adfasdfasdfas | |
| --2010-01-22 10:49:19-- http://gemcutter.org/gems/adfasdfasdfas | |
| Resolving gemcutter.org... 72.4.120.124 | |
| Connecting to gemcutter.org|72.4.120.124|:80... connected. | |
| HTTP request sent, awaiting response... 200 OK | |
| Length: 2694 (2.6K) [text/html] | |
| Saving to: `adfasdfasdfas' | |
| 100%[=========================================================================================================================================>] 2,694 --.-K/s in 0s |