Skip to content

Instantly share code, notes, and snippets.

View DanielMarquard's full-sized avatar

Daniel Marquard DanielMarquard

View GitHub Profile
@DanielMarquard
DanielMarquard / baseline-ami.json
Last active July 16, 2017 00:01
baseline-ami.json
{
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "{{user `aws_region`}}",
"source_ami": "{{user `aws_source_ami`}}",
"instance_type": "t2.micro",
"ssh_username": "centos",
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action" : [
"ec2:AttachVolume",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:CopyImage",
"ec2:CreateImage",
"ec2:CreateKeypair",
{
"variables": {
"aws_access_key": "",
"aws_secret_key": "",
"aws_region": "us-east-1",
"aws_source_ami": "ami-46c1b650"
}
}
@DanielMarquard
DanielMarquard / gist:7e259b662cdc0d8789df
Created May 8, 2015 07:42
Change website share link to tweet from native iPhone Twitter app
<a id="smart-tweet-button" href="https://twitter.com/intent/tweet?text=For%20a%20better%20%23UX,%20let%20mobile%20website%20visitors%20tweet%20with%20the%20Twitter%20iPhone%20app.%20http://netidy.co/1KoZ1Pb%20via%20%40Netidy" target="_blank">Tweet</a>
<script type="text/javascript">
if (navigator.userAgent.match(/(iPhone|iPad|iPod)/g)) {
document.getElementById('smart-tweet-button')
.href="twitter://post?message=For%20a%20better%20%23UX,%20let%20mobile%20website%20visitors%20tweet%20with%20the%20Twitter%20iPhone%20app.%20http://netidy.co/1KoZ1Pb%20via%20%40Netidy";
document.getElementById('smart-tweet-button')
.target="_self";
}
</script>