Skip to content

Instantly share code, notes, and snippets.

@zapnap
zapnap / postfix-config-aws-ses.txt
Created September 29, 2011 23:06
postfix config for AWS-SES
# /etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
@alexras
alexras / ssh-agent-snippets.sh
Created October 17, 2011 00:14
Bash snippets to automatically start and stop an ssh-agent process on login and logout
#!/bin/bash
## in .bash_profile
SSHAGENT=`which ssh-agent`
SSHAGENTARGS="-s"
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
eval `$SSHAGENT $SSHAGENTARGS`
trap "kill $SSH_AGENT_PID" 0
fi
@hgomez
hgomez / upload2bintray.sh
Last active March 24, 2017 08:58
Sample script to upload RPM package to bintray
#!/bin/sh
#
# You should define BINTRAY_ACCOUNT and BINTRAY_APIKEY here or from the outside
# BINTRAY_ACCOUNT is you Bintray account and BINTRAY_APIKEY, API Key generated under your Bintray profile
# Redefine following variables to match your own usage
RPMS_DIR=RPMS/noarch
BINTRAY_ACCOUNT=hgomez
BINTRAY_REPO=devops-incubator-rpm
@julienhay
julienhay / index.html
Last active September 26, 2018 14:04
Base template, jquery, jquery UI, bootstrap (CDN)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>test</title>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" />
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css" />
@prb
prb / maven_spark_magic.xml
Created May 12, 2014 16:47
Fragment of a pom.xml file for packaging separate worker and driver JARs for Spark.
<!-- Fragment of pom.xml -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
@amuraru
amuraru / create-hadoop-ext4.sh
Created December 13, 2014 14:23
Hadoop EXT4 formatting options
mkfs.ext4 -m 1 -T largefile -O dir_index,extent,sparse_super /dev/sdb
tested in OS 10.9.5
Configure Postfix for Gmail SMTP
Edit file /etc/postfix/main.cf
sudo vim /etc/postfix/main.cf
and add in the following below the commented out relayhosts :-
relayhost = [smtp.gmail.com]:587
@nikhan
nikhan / twitter.sh
Created January 1, 2016 04:45
twitter ffmpeg
ffmpeg -i test.mov -vcodec libx264 -vf 'scale=640:trunc(ow/a/2)*2' -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -strict experimental -r 30 out.mp4

Kubernetes + AWS ECR = ❤️

Makefile and YAML templates for automating the use of AWS Elastic Container Registry with Kubernetes.

Based off of this awesome Redsaid blog post.

Requirements

  • Amazon ECR, along with your AWS account ID and the region your ECR is in
  • AWS CLI
@nachokb
nachokb / centos-scaleway.md
Last active March 16, 2017 07:11
Instruction for running CentOS 6.7 on Scaleway's C2
  1. create a scaleway instance, let's call it centos-builder
  2. Ubuntu Trusty on a C2S is ok
  3. make sure to add an additional 50gb volume Screenshot_from_2016-03-11_02-19-22
  4. upload centos-root.fsa to centos-builder
  5. install FSArchiver
  6. apt-get install fsarchiver
  7. extract it on /dev/nbd1
  8. fsarchiver -v restfs centos-root.fsa id=0,dest=/dev/nbd1
  9. shut the machine down from Scaleway's web UI