Skip to content

Instantly share code, notes, and snippets.

@kylecannon
kylecannon / gist:4057111
Created November 12, 2012 02:00 — forked from anonymous/gist:4056793
EC2 cloudinit script for Puppet Enterprise
#!/bin/sh
# Script to boot strap new EC2 instances and get them connected to our Puppet Enterprise master
rpm --quiet -q git rubygems || yum -y install git rubygems
if rpm --quiet -q pe-puppet; then
# Puppet Enterprise is already installed, let's reconfigure it - this instance was most likely booted up in the past, or is using an AMI that already has Puppet baked in
service pe-puppet stop
cat > /etc/puppetlabs/puppet/puppet.conf <<EOF
@hudon
hudon / docker-log-truncate
Last active November 9, 2016 06:06
Automatically truncate docker logs on a coreos machine
cat > /var/tmp/log-truncate <<EOF
#!/bin/sh
set -eux
cd /var/lib/docker/containers
for id in *
do
logfile="\${id}/\${id}-json.log"
[ -e "\${logfile}" ] && truncate -s 0 "\${logfile}"
done
btrfs balance start -v -dusage=20 /var/lib/docker/btrfs
@grafjo
grafjo / build.gradle
Created October 31, 2014 14:17
Example gradle build to upload a Spring Boot based jar to nexus
group = "foo"
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.1.8.RELEASE")
}
}
@samatjain
samatjain / Encrypted-Amazon-Cloud-Drive.md
Last active May 18, 2017 18:50
Setting up a encrypted drive on Amazon Cloud Drive w/ EncFS and acd_cli

Environment

export ACD_LOCAL=$HOME/.cache/Amazon-Cloud-Drive

# To use this file later
export ENCFS6_CONFIG=$ACD_LOCAL/encfs6.xml

Setup

mkdir -p \

@stephen-mw
stephen-mw / ec2list.go
Last active December 14, 2017 01:38
Ec2 list in go
package main
import (
"fmt"
"github.com/awslabs/aws-sdk-go/aws"
"github.com/awslabs/aws-sdk-go/service/ec2"
"github.com/vaughan0/go-ini"
"net/url"
"os"
"runtime"
@JMBattista
JMBattista / install_gradle
Last active April 24, 2018 17:31
Upgrade Gradle Codeship
#!/bin/bash
# Allows using different Gradle versions with http://codeship.io
#
# As @altfatterz points out below this isn't necessary if you choose to check in your .gradle and gradlew.bat/gradlew.sh files.
# I prefer not to check-in the generated files so I set this up.
#
# We update the path here instead of via the environment variables because you cannot control the order
# that environment variables are set in the Environment tab, and this results in the path NOT having the version number
# see test_commands for info on how to run gradle without settings the path here if you want to avoid it.
#
@mark-adams
mark-adams / lift_json.rb
Created November 30, 2015 05:12
A handy fluentd filter for lifting out nested json log messages from Docker logs.
module Fluent
class LiftJsonFilter < Filter
Fluent::Plugin.register_filter('lift_json', self)
def filter(tag, time, record)
begin
record = record.merge JSON.parse(record['log'])
record.delete 'log'
rescue Exception
end
@bruno-
bruno- / gist:eddd6298deaa4940c52c
Created August 13, 2014 19:05
signing git commits - cheat sheet

Article: http://mikegerwitz.com/papers/git-horror-story

Theory

  • faking other user's commits is easy with --author flag $ git commit --author='Foo Bar <foo@bar.com>' -m 'some commit'

  • signing commits ensures:

    • someone else can't commit as myself
  • I really commited all the commits I sign

@alanivey
alanivey / Homebrew.md
Last active August 18, 2018 14:59
Homebrew MAMP on OS X Mavericks
@lifthrasiir
lifthrasiir / inquiry.md
Last active July 30, 2019 13:15
"구글, 'https' 채택 안한 누리집에 안전하지 않은 곳 '낙인'" 기사에 대한 의견

아래 메일은 2017-02-12 21:43(이하 한국 표준시)에 한겨레 기사에 대한 의견으로서 기사에 제시된 김재섭 기자의 메일로 보낸 내용이다. 메일에서 사실 관계 등의 오류가 있다면 모두 나의 실수이다.

2017-02-13 14:53에 덧붙임: 더 이상 gist를 비공개로 할 이유가 없어졌으므로 공개로 전환. 이 메일에 대한 답변은 받았으나 공개할 만큼 중요한 반론이 들어 있진 않으며 공개 여부도 묻지 않았으므로 공개하지 않는다. 아래 글 자체에도 다양한 비문과 오자가 있으나 본래 보낸 내용을 살리기 위해 전혀 수정을 하지 않기로 했음을 양해 바람.

2017-02-13 19:00에 덧붙임: 이 기사의 후속으로 구글코리아 측의 기자간담회가 올라갔다. 새 기사에 대해서는 특이한 게 없으므로 노코멘트. 또한 위의 기사 링크를 미디어다음에서 한겨레 웹사이트로 가도록 수정.

원문

안녕하십니까, 귀하께서 작성하신 (물론 저는 그 진위를 알 수 없습니다만, 적어도 그렇게 나와 있는) 기사에 대한 의견을 제기하고자 메일을 씁니다. 이 메일은 저의 개인 의견이며 저를 고용하고 있는 회사나 단체 등의 의견을 전혀 대변하지 않음을 혹시나 싶지만 미리 밝혀 둡니다.