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
(gdb) p *req | |
$4 = {*net/http.Request = 0xc2000bb680, Params = 0xc20014b600} | |
(gdb) p *req->Params | |
A syntax error in expression, near `>Params'. |
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
| GoSublime error: MarGo build failed | |
| > This is possibly a bug or miss-configuration of your environment. | |
| > For more help, please file an issue with the following build output | |
| > at: https://github.com/DisposaBoy/GoSublime/issues/new | |
| > or alternatively, you may send an email to: gosublime@dby.me | |
| > | |
| > | |
| > cmd: `['/usr/local/Cellar/go/1.2rc1/libexec/bin/go', 'build', '-v', '-x', '-o', 'gosublime.margo_r13.08.31-1_devel+f4d1cb8d9a91.exe', 'gosubli.me/margo']` | |
| > stdout: `` | |
| > stderr: `WORK=/var/folders/rl/v51_qqj51pg_s36ld0v165n40000gn/T/go-build127954290 |
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
# curl -s http://data.iana.org/TLD/tlds-alpha-by-domain.txt | grep -vE "^#" | awk '{print length($1),$0}' | sort -k1nr | cut -d' ' -f 2- | tr '\n' '|' | |
TOP_LEVEL = /XN--CLCHC0EA0B2G2A9GCD|XN--HGBK6AJ7F53BBA|XN--HLCJ6AYA9ESC7A|XN--11B5BS3A9AJ6G|XN--MGBERP4A5D4AR|XN--XKC2DL3A5EE0H|XN--80AKHBYKNJ4F|XN--XKC2AL3HYE2A|XN--LGBBAT1AD8J|XN--MGBC0A9AZCG|XN--9T4B11YI5A|XN--MGBAAM7A8H|XN--MGBAYH7GPA|XN--MGBBH1A71E|XN--MGBX4CD0AB|XN--FPCRJ9C3D|XN--FZC2C9E2C|XN--YFRO4I67O|XN--YGBI2AMMX|XN--3E0B707E|XN--JXALPDLP|XN--KGBECHTV|XN--MGB9AWBF|XN--OGBPF8FL|XN--0ZWM56D|XN--45BRJ9C|XN--80AO21A|XN--DEBA0AD|XN--G6W251D|XN--GECRJ9C|XN--H2BRJ9C|XN--J6W193G|XN--KPRW13D|XN--KPRY57D|XN--PGBS0DH|XN--S9BRJ9C|XN--90A3AC|XN--FIQS8S|XN--FIQZ9S|XN--O3CW4H|XN--WGBH1C|XN--WGBL6A|XN--ZCKZAH|XN--P1AI|MUSEUM|TRAVEL|AERO|ARPA|ASIA|COOP|INFO|JOBS|MOBI|NAME|POST|BIZ|CAT|COM|EDU|GOV|INT|MIL|NET|ORG|PRO|TEL|XXX|AC|AD|AE|AF|AG|AI|AL|AM|AN|AO|AQ|AR|AS|AT|AU|AW|AX|AZ|BA|BB|BD|BE|BF|BG|BH|BI|BJ|BM|BN|BO|BR|BS|BT|BV|BW|BY|BZ|CA|CC|CD|CF|CG|CH|CI|CK|CL|CM|CN|CO |
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
module Bar | |
module Baz | |
end | |
end | |
class Foo | |
include Bar::Baz | |
end | |
class Foo |
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
groups = Rails.groups(assets: %w(development test)) | |
unless Rails.env.production? | |
user = `cd "#{Rails.root}" && git config user.email`.chomp | |
groups << user unless user.blank? | |
end | |
Bundler.require(*groups) |
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
func loadWebshims() { | |
scr = document.createElement("script") | |
scr.type = "text/javascript" | |
scr.src = "#{asset_path('javascript.js')" | |
document.head.appendChild(scr) | |
} | |
setTimeout(loadWebshims, 0) |
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
Installing libv8 (3.3.10.4) with native extensions | |
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
/Users/divoxx/.rbenv/versions/ree-1.8.7-2012.02/bin/ruby extconf.rb | |
*** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of | |
necessary libraries and/or headers. Check the mkmf.log file for more | |
details. You may need configuration options. | |
Provided configuration options: |
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
package main | |
import ( | |
"fmt" | |
"math" | |
"sort" | |
) | |
// Wraps a slice of ints with a target num and define sorting by distance from element and the num | |
type IntDistSlice struct { |
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 RomanNumeral | |
VALUE_MAPPER = [['M', 1000], ['D', 500], ['L', 50], ['X', 10], ['IX', 9], ['V', 5], ['IV', 4], ['I', 1]] | |
def initialize(int) | |
@int = int.freeze | |
end | |
def to_roman | |
output = '' | |
num = @int |
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 RomanNumeral | |
VALUE_MAPPER = [['M', 1000], ['D', 500], ['L', 50], ['X', 10], ['IX', 9], ['V', 5], ['IV', 4], ['I', 1]] | |
def roman num | |
output = '' | |
while num > 0 | |
VALUE_MAPPER.each do |letter, letter_value| | |
num_of_letters = (num / letter_value) |