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
# Adds assets and view to the etags calculation | |
module SmarterConditionalGet | |
extend ActiveSupport::Concern | |
included do | |
# Add assets digest to etag | |
etag { Rails.application.assets.digest.to_s } | |
# Add a random value to the etag in dev to bust the cache | |
etag { rand if Rails.env.development? } |
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
# Ansible EC2 external inventory script settings | |
# | |
[ec2] | |
# to talk to a private eucalyptus instance uncomment these lines | |
# and edit edit eucalyptus_host to be the host name of your cloud controller | |
#eucalyptus = True | |
#eucalyptus_host = clc.cloud.domain.org |
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" | |
"github.com/spf13/cobra" | |
) | |
var cmd = &cobra.Command{ | |
Use: "cobratest", |
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
❯ target/debug/hcl2 <<EOF | pbcopy | |
test block "label" { | |
a = 1.4e9 | |
b = -73.19e-12 | |
internal { | |
a = "test string here" | |
b = 5 | |
c = 7.3 | |
d = -3 |
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
""" | |
Deployment tasks for salt | |
""" | |
from __future__ import absolute_import | |
import io | |
import os | |
import tarfile | |
import time |
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
#!/bin/bash | |
restart() { | |
osascript -l JavaScript <<EOF > /dev/null | |
var app = Application('$1') | |
if (app.running()) { | |
try { app.quit() } catch (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
package main | |
import ( | |
"crypto/rand" | |
"encoding/base64" | |
"fmt" | |
) | |
func main() { | |
buf := make([]byte, 64) |
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
db.Update(func(tx *bolt.Tx) error { | |
var res error | |
buckets := [][]byte{ | |
[]byte("permissions"), | |
[]byte("history"), | |
[]byte("schedules"), | |
} | |
for _, name := range buckets { | |
if _, err := tx.CreateBucketIfNotExists(name); err != nil { |
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
<!doctype html> | |
<html> | |
<body> | |
<h1>Body</h1> | |
{{template "test"}} | |
</body> | |
</html> |
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
<!doctype html> | |
<html> | |
<head><title>Arts!</title></head> | |
<body> | |
<h1>Some content</h1> | |
<p>Goes here</p> | |
{{template "content"}} | |
</body> | |
</html> | |
NewerOlder