Skip to content

Instantly share code, notes, and snippets.

@app.route('/')
def index():
template = render_template('index.html', year=datetime.now().year)
return template
and then in template simply
{{ year }}
.
├── lib
│ └── puppet
│ ├── feature
│ │ └── fog.rb
│ ├── provider
│ │ ├── dnsrr
│ │ │ └── fog.rb
│ │ ├── dnszone
│ │ │ └── fog.rb
LoadError: no such file to load -- i18n
require at org/jruby/RubyKernel.java:1085
require at file:/opt/logstash/vendor/jar/jruby-complete-1.7.11.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
require at /opt/logstash/lib/logstash/JRUBY-6970.rb:27
(root) at /opt/logstash/lib/logstash/runner.rb:50
@eskp
eskp / keybase.md
Last active August 29, 2015 14:07

Keybase proof

I hereby claim:

  • I am eskp on github.
  • I am eskp (https://keybase.io/eskp) on keybase.
  • I have a public key whose fingerprint is EDF6 9B88 EE4E 1994 A664 353C 2DD4 EF5D EF2D 82C9

To claim this, I am signing this object:

@eskp
eskp / style.css
Last active April 27, 2016 10:26
@charset "utf-8";
#header {
background-color: red !important;
}
scrape_configs:
- job_name: 'myservice'
dns_sd_configs:
- names: ['tasks.myservice']
type: A
port: 8080
# nslookup tasks.myservice
Server: 127.0.0.11
Address 1: 127.0.0.11
Name: tasks.myservice
Address 1: 10.0.0.13 myservice.1.ygx1zy6cuay9w3ownyplzux4w.proxy
- job_name: federate
scrape_interval: 60s
honor_labels: true
metrics_path: '/federate'
params:
'match[]':
- '{job="myservice"}'
static_configs:
- targets:
- <services-prom-address>:9090
- job_name: ec2_instances
ec2_sd_configs:
- region: au-region-1
access_key: RO_ACCESS_KEY
secret_key: RO_SECRET_KEY
port: 9100
relabel_configs:
# Use the instance tag as the instance label
- source_labels: [__meta_ec2_tag_Name]
target_label: instance