Skip to content

Instantly share code, notes, and snippets.

@yustam
yustam / redis.config
Last active December 16, 2023 06:45
Install Redis on Elastic Beanstalk
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 / newrelic.config
Created April 9, 2014 05:25
Install and start newrelic daemon on Amazon ElasticBeanstalk
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 / dabblet.css
Created February 22, 2012 00:25
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body {
background: blue;
background: linear-gradient(1deg, aqua, blue);
min-height:100%;
}
#text {
color: red;
@yustam
yustam / velocity-cfn-template-sample.template
Created October 18, 2014 03:31
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 August 29, 2015 14:07
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 01:31
Install oracle jdk7 on Amazon ElasticBeanstalk
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 / simpledb-delete-item.js
Created April 7, 2014 08:17
delete items in Amazon SimpleDB (require node.js and aws-javascript-sdk)
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 March 20, 2014 05:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console