$ rails g model User
belongs_to
has_one
if ($request_uri = /) { | |
set $test A; | |
} | |
if ($host ~* teambox.com) { | |
set $test "${test}B"; | |
} | |
if ($http_cookie !~* "auth_token") { | |
set $test "${test}C"; |
I've been using this technique in most of my Ruby projects lately where Ruby versions are required:
.rbenv-version
containing the target Ruby using a definition name defined in ruby-build (example below). These strings are a proper subset of RVM Ruby string names so far....rvmrc
(with rvm --create --rvmrc "1.9.3@myapp"
) and edit the environment_id=
line to fetch the Ruby version from .rbenv-version
(example below).Today I learned about another Ruby manager, rbfu, where the author is using a similar technique with .rbfu-version
.
# Block commit include focus tag for test | |
git stash --keep-index -q | |
FOCUS_TAGS=$(grep -rn ':focus => true' spec/*/**) | |
result=$? | |
git stash pop -q | |
if [ $result -eq 0 ]; then | |
echo "### PLEASE REMOVE FOCUS TAGS ###" | |
echo "$FOCUS_TAGS" | |
exit 1 | |
fi |
--- ext/openssl/ossl_pkey_ec.c | |
+++ ext/openssl/ossl_pkey_ec.c | |
@@ -757,8 +757,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self) | |
method = EC_GFp_mont_method(); | |
} else if (id == s_GFp_nist) { | |
method = EC_GFp_nist_method(); | |
+#if !defined(OPENSSl_NO_EC2M) | |
} else if (id == s_GF2m_simple) { | |
method = EC_GF2m_simple_method(); | |
+#endif |
#!/bin/bash | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
socat Examples | |
=============== | |
* 注意 | |
- SYSTEM で : を使う時は必ずエスケープすること | |
* 相手に接続 | |
# telnet, netcat, socat それぞれの場合 | |
$ socat - TCP:127.0.0.1:8000 |
#!/usr/bin/env python | |
import requests, json | |
d = requests.get('https://ip-ranges.amazonaws.com/ip-ranges.json').text | |
l = json.loads(d) | |
for ip_range in [x['ip_prefix'] for x in l['prefixes'] if x['service']=='CLOUDFRONT' ]: | |
print ip_range |