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" | |
var true = false | |
func main() { | |
fmt.Println(true) | |
} |
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
def myfunc(prog = "") | |
mystr = "hi there" | |
eval(prog) | |
mystr.scream | |
end | |
puts 'first' | |
begin | |
myfunc | |
rescue => e |
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
[fg-386] tldr-cpp-client > ./tldr -l | |
Pages for osx | |
airport | |
apachectl | |
archey | |
as | |
base64 | |
brew-cask | |
brew-mas | |
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
From 46cff894e9de7284395b4df996914221f96fc1ac Mon Sep 17 00:00:00 2001 | |
From: Aidan Coyle <packrat386@gmail.com> | |
Date: Tue, 20 Nov 2018 21:40:36 -0600 | |
Subject: [PATCH] Bats first attempt | |
--- | |
src/pv/display.c | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
diff --git a/src/pv/display.c b/src/pv/display.c |
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 CustomerNotifier | |
def initialize(mail_server, templates) | |
@mail_server = mail_server | |
@templates = templates | |
end | |
def confirm_order(customer, data) | |
@mail_server.send_mail(customer.email_address, @templates[:confirm_order].render(data)) | |
end |
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
require 'benchmark/ips' | |
SIZE = 10 | |
Benchmark.ips do |x| | |
x.report('insane') do | |
[0].cycle.take(SIZE) | |
end | |
x.report('sane') do |
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
From ee8b5f5c1f4072affd1c3d68209e39889831c56e Mon Sep 17 00:00:00 2001 | |
From: Aidan Coyle <packrat386@gmail.com> | |
Date: Sun, 10 Feb 2019 15:54:21 +0000 | |
Subject: [PATCH] Override the RB_TEST macro to check falsiness | |
Rather than only accepting the exact values Qnil and Qfalse, instead | |
check the class of the VALUE passed to see if it is FalseClass. | |
--- | |
eval.c | 16 ++++++++++++++++ | |
include/ruby/ruby.h | 12 ++++++------ |
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 re | |
import "fmt" | |
type builderEdge struct { | |
from int64 | |
to int64 | |
on rune | |
} |
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 index | |
func Index(s, sep []byte) int { | |
pos := 0 | |
for { | |
if pos+len(sep) > len(s) { | |
return -1 | |
} |
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" | |
func handle(f func(input string) string) { fmt.Println(f("foo")) } | |
func main() { | |
handle(func(input string) string { | |
return handler(input, &ic{42}, &sc{"bar"}) | |
}) |