Skip to content

Instantly share code, notes, and snippets.

@gong023
gong023 / gist:4136670
Created November 23, 2012 18:01
chrome extention test
### test
@gong023
gong023 / rspec_stub_bug.rb
Created September 13, 2013 09:32
rspec_stub_bug????
require 'yaml'
class A
def load_setting
YAML.load_file("./hoge.yaml") # hoge.yaml => setting: 1
end
end
class B
CONST = A.new.load_setting
@gong023
gong023 / niconicofix.diff
Last active December 24, 2015 09:59
fix nicnonico login fix ranking parsing
diff --git a/lib/niconico.rb b/lib/niconico.rb
index da773f9..d9f8940 100644
--- a/lib/niconico.rb
+++ b/lib/niconico.rb
@@ -22,6 +22,7 @@ class Niconico
@logined = false
@agent = Mechanize.new
+ @agent.ssl_version = "SSLv3"
end
@gong023
gong023 / fail switch_to.frame log
Created November 1, 2013 08:14
fail switch_to.frame log using Appium GUI 0.11.2
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"browserName":"","platform":"Mac","version":"6.1","device":"iPhone Simulator","app":"safari"}}
info: Trying to use mobile safari, version 6.1
info: Looking for built in app MobileSafari
info: Got app, trying to copy /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/Applications/MobileSafari.app to tmp dir
@gong023
gong023 / introduce_grunt_contrib_jasmine.diff
Created February 24, 2014 14:43
grunt_contrib_jasmine
diff --git a/.gitignore b/.gitignore
index 509eb00..99f37ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
js/libs/
+node_modules/
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..ab4b14e
#[allow(non_camel_case_types)]
struct __;
impl __ {
pub fn hello() {
println!("hello");
}
}
fn main() {
--- Type 'make test' to test library
--- Built internal test runner
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
src/test.rs:18:23: 18:45 error: borrowed value does not live long enough
src/test.rs:18 let initial_vec = __::Vect::new(vec_int).initial(2u);
^~~~~~~~~~~~~~~~~~~~~~
# にこまき
- EERR
- 大島智
- たみふる
- D否
# のぞえり
- murata
- 鈴宮きりは
- 高乃朔
use std::hash::Hash;
use std::collections::HashMap;
pub struct Hashing<K: Eq + Hash, V: Eq + Hash> {
x: HashMap<K, V>
}
impl<'a, K: Eq + Hash + Clone, V: Eq + Hash + Clone> Hashing<K, V> {
pub fn new(h: HashMap<K, V>) -> Hashing<K, V> {
Hashing { x: h }
fn hoge() -> ||:'static -> bool {
let a = || { true };
return a;
}
fn main() {
let a = hoge();
a();
}