Skip to content

Instantly share code, notes, and snippets.

View jamescarr's full-sized avatar
🎯
Focusing

James Carr jamescarr

🎯
Focusing
View GitHub Profile
@jamescarr
jamescarr / shell.py
Last active May 31, 2023 10:33
Test jinja2 out in a console quickly. If you have jinja2 installed locally just open a python REPL and do this!
from jinja2 import Template
text = """
hi {{ name|default(other_name) }}
"""
template = Template(text)
template.render(name="foo") # passing variables here to the text template if needed
template.render(other_name="bar")
NameVirtualHost answers.example.com:80
<VirtualHost answers.example.com:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/answers
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/answers/>
#!/usr/bin/env zsh
function aws-rds-describe() {
zparseopts -D -E -A opts -- o:
output=${opts[-o]:-"table"}
name=${1}
query=(
"DBInstances[]"
".{"
function sum(n){
arguments.callee.toString = function(){
return sum;
}
if(!arguments.callee.sum){
arguments.callee.sum=0
}
arguments.callee.sum += n
var sum = arguments.callee.sum
return arguments.callee

Uptime

select * from uptime;

Sytem Inventory

Datadoggin' for Fun and Profit

Today We Will Cover

  • Exploring metrics
  • APM
  • Synthetics
  • Using Notebooks
  • Building a Custom Dashboard
  • And More
  • events
### Keybase proof
I hereby claim:
* I am jamescarr on github.
* I am jamescarr (https://keybase.io/jamescarr) on keybase.
* I have a public key ASAiU20sGsNecdzYGqyyswSbo3qJw380XF_-HrTCY1cNUAo
To claim this, I am signing this object:
for {
select {
case m, ok := <-c:
if !ok {
breakl
}
handle(m)
case <-time.After(1 * time.Minute):
fmt.Println("timed out")
break
@jamescarr
jamescarr / sample-slack-coc.md
Last active June 20, 2017 00:46 — forked from annalee/sample-slack-coc.md
A sample code of conduct for social slack teams.

DevComo Code of Conduct

Welcome!

DevComo is a slack channel to connect engineers, designers, sysadmins and other technistas from the Mid Missouri Area

The current admins are:

  • jamescarr
exch := msg.Exchange
if val, ok := msg.Headers["x-original-exchange"]; ok {
exch = msg.Headers["x-original-exchange"]
}