Skip to content

Instantly share code, notes, and snippets.

@yustam
yustam / velocity-cfn-template-sample.template
Created Oct 18, 2014
velocity-cfn-template-sample.template
View velocity-cfn-template-sample.template
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "this is my sample template.",
"Resources" : {
"SampleSG" : {
"Type" : "AWS::EC2::SecurityGroup",
"DeletionPolicy" : "Delete",
"Properties" : {
"GroupDescription" : "this is a sample.",
"SecurityGroupIngress" : [
@yustam
yustam / velocity-cfn-template-sample.template.vm
Last active Aug 29, 2015
velocity-cfn-template-sample.template.vm
View velocity-cfn-template-sample.template.vm
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "$description",
"Resources" : {
"$security_group.name" : {
"Type" : "AWS::EC2::SecurityGroup",
"DeletionPolicy" : "Delete",
"Properties" : {
"GroupDescription" : "$security_group.description",
"SecurityGroupIngress" : [
@yustam
yustam / jdk7.config
Created May 2, 2014
Install oracle jdk7 on Amazon ElasticBeanstalk
View jdk7.config
files:
"/home/ec2-user/install-oracle-jdk.sh":
mode: "000755"
owner: ec2-user
group: ec2-user
content: |
#!/usr/bin/env bash
wget -O jdk-7u25-linux-x64.rpm --no-cookies --no-check-certificate --header 'Cookie:gpw_e24=http://www.oracle.com; oraclelicense=accept-securebackup-cookie' 'http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.rpm'
rpm -Uvh /home/ec2-user/jdk-7u25-linux-x64.rpm
alternatives --install /usr/bin/java java /usr/java/default/bin/java 3
@yustam
yustam / newrelic.config
Created Apr 9, 2014
Install and start newrelic daemon on Amazon ElasticBeanstalk
View newrelic.config
packages:
yum:
newrelic-sysmond: []
rpm:
newrelic: http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
commands:
configure_new_relic:
command: nrsysmond-config --set license_key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
start_new_relic:
command: /etc/init.d/newrelic-sysmond start
@yustam
yustam / simpledb-delete-item.js
Created Apr 7, 2014
delete items in Amazon SimpleDB (require node.js and aws-javascript-sdk)
View simpledb-delete-item.js
var config = require('../config.json');
var AWS = require('aws-sdk');
AWS.config.loadFromPath('config.json');
var simpledb = new AWS.SimpleDB();
var delete_item = function (name, data) {
var params = {
DomainName: config.domainName,
Items: [
{
@yustam
yustam / 0_reuse_code.js
Created Mar 20, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@yustam
yustam / redis.config
Last active Jul 31, 2021
Install Redis on Elastic Beanstalk
View redis.config
packages:
yum:
gcc-c++: []
make: []
sources:
/home/ec2-user: http://download.redis.io/releases/redis-2.8.4.tar.gz
commands:
redis_build:
command: make
cwd: /home/ec2-user/redis-2.8.4
@yustam
yustam / dabblet.css
Created Feb 22, 2012
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
body {
background: blue;
background: linear-gradient(1deg, aqua, blue);
min-height:100%;
}
#text {
color: red;