I hereby claim:
- I am dolzenko on github.
- I am dolzenko (https://keybase.io/dolzenko) on keybase.
- I have a public key ASAipUSRr1nXIPSfQHVNeEFTKKf7snq4L8dxWbcm7uQrcAo
To claim this, I am signing this object:
:: if the service is run in Session 0 then open a console for that session and run it from there | |
:: e.g. %PsExec% -s -h -d -i 0 cmd.exe | |
:: set the paths for your environment | |
set PsExec=C:\Apps\SysInternals\PsExec.exe | |
set JAVA_HOME=C:\Apps\Java\jdk1.8.0_121 | |
set DUMP_DIR=C:\temp | |
@echo off |
# read more at https://terrty.net/2014/ssl-tls-in-nginx/ | |
# latest version on https://gist.github.com/paskal/628882bee1948ef126dd/126e4d1daeb5244aacbbd847c5247c2e293f6adf | |
# security test score: https://www.ssllabs.com/ssltest/analyze.html?d=terrty.net | |
# your nginx version might not have all directives included, test this configuration before using in production against your nginx: | |
# $ nginx -c /etc/nginx/nginx.conf -t | |
server { | |
# public key, contains your public key and class 1 certificate, to create: | |
# (example for startssl) | |
# $ (cat example.com.pem & wget -O - https://www.startssl.com/certs/class1/sha2/pem/sub.class1.server.sha2.ca.pem) | tee -a /etc/nginx/ssl/domain.pem > /dev/null |
I hereby claim:
To claim this, I am signing this object:
There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.
All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.
What do these lines do? Make predictions and then scroll down.
func print(pi *int) { fmt.Println(*pi) }
# Put this file in config/initializers/irb.rb | |
# Works in Rails 3.0+, should also work in 2.3 | |
# Override the IRB, to provide the Rails environment in the prompt | |
module IRB | |
class << self | |
def setup_with_prompt_override(ap_path) | |
setup_without_prompt_override(ap_path) | |
env = (Rails.env.to_sym == :production ? "\033[00;31mPRODUCTION\033[00m" : Rails.env) |
# .irbrc | |
if defined?(Rails) && Rails.production? | |
conf = IRB.conf[:PROMPT][IRB.conf[:PROMPT_MODE]] | |
red = "\033[0;31m" | |
reset = "\033[0m" | |
[:PROMPT_S, :PROMPT_C].each do |p| | |
conf[p].gsub!(/^(.*)$/, "#{red}\\1#{reset}") | |
end | |
conf[:PROMPT_I] = "#{red}%N(%m):%03n:%i (PRODUCTION) > #{reset}" | |
end |
10.240.0.53 mm-1 | |
10.240.0.55 mm-2 | |
10.240.0.56 mm-3 | |
10.240.0.21 ms-1 | |
10.240.0.23 ms-2 | |
10.240.0.29 ms-3 | |
10.240.0.34 ms-4 | |
10.240.0.36 ms-5 | |
10.240.0.31 ms-6 | |
10.240.0.32 ms-7 |
package main | |
import "fmt" | |
func f() (int, error) { | |
return 42, nil | |
} | |
func main() { | |
x := 3 |
require 'json' | |
require 'set' | |
myself = `go list`.strip | |
deps = Set.new | |
`go list ./...`.each_line do |dep| | |
pdeps = JSON.parse(`mgmt go list -json #{dep}`) | |
deps += pdeps['Deps'] | |
deps += pdeps['TestImports'] if pdeps['TestImports'] |
module Acme | |
module Sidekiq | |
module PaperTrailMiddleware | |
class Client | |
# @param [Object] | |
# @param [Hash] job | |
def call(_, job, *) | |
job['whodunnit'] = ::PaperTrail.whodunnit | |
yield | |
end |