Skip to content

Instantly share code, notes, and snippets.

View serhatcan's full-sized avatar

Serhat Can serhatcan

View GitHub Profile
@serhatcan
serhatcan / README.md
Created December 16, 2016 14:27 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


Index:

dynamodb.listTables().eachPage(function(err, data) {
if (err) {
ppJson(err); // an error occurred
} else if (data) {
console.log(data);
data["TableNames"].forEach(function(tablename, i) {
console.log(tablename);
var params = {
TableName: tablename,
@serhatcan
serhatcan / batch-create-alerts
Created August 29, 2016 14:18 — forked from jonarddoci/batch-create-alerts
create opsgenie alerts using a waterfall model with delay in between
var opsgenie = require("opsgenie-sdk");
opsgenie.configure({
'api_key': '0d3deae3-a362-4c79-b485-dfd1ad56947c',
'host': "http://127.0.0.1:9000"
});
function waterfall(func, timeout, iterations, index){
console.log(index);
var params = {
TableName: 'table_name',
};
docClient.scan(params, function(err, data) {
if (err) ppJson(err); // an error occurred
else {
data.Items.forEach(function(obj,i){
console.log(i);
console.log(obj);
@serhatcan
serhatcan / opsgenie-github-integration
Last active July 29, 2016 05:57
OpsGenie Github Integration - Create alert when issue opened
'use strict';
console.log('Loading function');
let opsgenie = require('opsgenie-sdk');
opsgenie.configure({
'api_key': 'e18d30fb-9bfd-41f6-a6b9-e0a940ec8ce4'
});
exports.handler = (event, context, callback) => {
@serhatcan
serhatcan / genymotionwithplay.txt
Created November 9, 2015 22:15 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161892865 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
@serhatcan
serhatcan / momentjs-avaliable-timezones
Created July 15, 2015 07:21
Writes avaliable timezones used in MomentJS. Download moment.js and moment-timezone-with-data.js and put them in the same directory
<html>
<head>
<script src="moment.min.js"></script>
<script src="moment-timezone-with-data.js"></script>
</head>
<body>
<p id="demo"></p>
<script>
var timezones = moment.tz.names();