This file contains 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
--- | |
id: 1 | |
type: book | |
awards: | |
books: | |
- id: 1 | |
title: International Botev | |
reviewers: | |
- id: 2 | |
name: PersonB |
This file contains 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
ruby dotNetHash.rb password123 LU7hUk4MXAvlq6DksvP9SQ== | |
require "base64" | |
require “digest” | |
# Encode password as double-width characters | |
password_as_text = ARGV.first | |
double_width_password = [] | |
double_width_password = password_as_text.encode("UTF-16LE").bytes.to_a | |
# Unencode the salt |
This file contains 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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' | |
# Rails 4.2 throws an exception on last test case |
This file contains 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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' | |
This file contains 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
class YouTubeIt::Upload::VideoUpload | |
def comments_with_meta(video_id_or_url, opts = {}) | |
url = if video_id_or_url.start_with?('http') | |
video_id_or_url | |
else | |
comment_url = "/feeds/api/videos/%s/comments?" % video_id_or_url | |
comment_url << opts.collect { |k, p| [k, p].join '=' }.join('&') | |
end | |
response = yt_session.get(url) | |
comments = YouTubeIt::Parser::CommentsFeedParser.new(response).parse |
This file contains 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
@page { | |
size: 8.5in 11in landscape; | |
margin: 1cm; | |
} | |
table { | |
background: #ff8244; | |
} | |
.half-image { |
This file contains 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
# requires socksify gem | |
require "socksify" | |
require 'socksify/http' | |
# use w/ OAuth2 like OAuth2::Client.new(id, secret, connection_opts: { proxy: 'socks://127.0.0.1:9050' }) | |
class Faraday::Adapter::NetHttp | |
def net_http_connection(env) | |
if proxy = env[:request][:proxy] | |
if proxy[:uri].scheme == 'socks' | |
Net::HTTP.SOCKSProxy(proxy[:uri].host, proxy[:uri].port) |
This file contains 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
"jruby-rack-worker#1" daemon prio=10 tid=0x00007f4a8ce3d000 nid=0x3c08 runnable [0x00007f4a4f042000] | |
java.lang.Thread.State: RUNNABLE | |
at sun.nio.ch.NativeThread.current(Native Method) | |
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:325) | |
- locked <0x000000075a084f68> (a java.lang.Object) | |
- locked <0x000000075a084f48> (a java.lang.Object) | |
at org.jruby.ext.openssl.SSLSocket.readAndUnwrap(SSLSocket.java:513) | |
at org.jruby.ext.openssl.SSLSocket.read(SSLSocket.java:501) | |
at org.jruby.ext.openssl.SSLSocket.do_sysread(SSLSocket.java:613) | |
at org.jruby.ext.openssl.SSLSocket.sysread_nonblock(SSLSocket.java:636) |
This file contains 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
Your system is raring to brew. |
This file contains 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
brew doctor | |
Your system is raring to brew. |
NewerOlder