Skip to content

Instantly share code, notes, and snippets.

View nilesolutions's full-sized avatar

Ahmed Samy nilesolutions

  • Abu dhabi
View GitHub Profile
@nilesolutions
nilesolutions / lambda-handler.js
Created May 13, 2021 14:30 — forked from raecoo/lambda-handler.js
AWS S3 + Lambda + Elastic Transcoder to encode incoming media files automagically
/*
* Copyright (C) 2016 Raecoo Cao
* See LICENSE for the copy of MIT license
*/
// https://support.google.com/youtube/answer/2853702?hl=zh-Hans
// BEGIN Lambda configuration
//
var pipelineId = '1481448705022-x1efcv'; // change to your pipeline!
@nilesolutions
nilesolutions / v-tabs-fix.vue
Created February 25, 2021 08:23 — forked from abhaywawale/v-tabs-fix.vue
This will fix the active tab issue
<template>
<v-container fluid>
<v-layout align-start justify-center>
<v-flex xs4 class="elevation-2 ma-2">
<v-tabs v-model="model" color="cyan" dark slider-color="yellow">
<draggable v-model="tabs" class="v-tabs__container" @update="tabUpdate">
<v-tab v-for="(tab, index) in tabs" :key="index" :href="`#tab-${index}`">
{{ tab.name }}
</v-tab>
</draggable>
@nilesolutions
nilesolutions / v-tabs-problem.vue
Created February 25, 2021 08:21 — forked from abhaywawale/v-tabs-problem.vue
The v-tabs had a problem in showing corrent indicator after drag-n-drop
<template>
<v-container fluid>
<v-layout align-start justify-center>
<v-spacer></v-spacer>
<v-flex xs4 class="elevation-1 pa-3 ma-2">
<v-tabs v-model="active" color="cyan" dark slider-color="yellow">
<draggable v-model="tabs" class="v-tabs__container">
<v-tab v-for="tab in tabs" :key="tab.id" ripple>
{{ tab.name }}
</v-tab>
@nilesolutions
nilesolutions / gist:1cd45bd0e2c5a9571f8e9d590e396cbc
Created July 5, 2020 21:43 — forked from harrisonde/gist:90431ed357cc93e12b51
Deploy Laravel 5 applications on AWS Elastic Beanstalk
# The following script will deploy a Laravel 5 applicaion on AWS Elastic Beanstalk.
# Add to .ebextensions at the root of your application and name your commands file (e.g., commands.config)
# -------------------------------- Commands ------------------------------------
# Use "commands" key to execute commands on the EC2 instance. The commands are
# processed in alphabetical order by name, and they run before the application
# and web server are set up and the application version file is extracted.
# ------------------------------------------------------------------------------
commands:
01updateComposer:
@nilesolutions
nilesolutions / minimize-and-float-video-on-scroll.css
Created April 18, 2020 19:02
JW Player Demo: Minimize and Float Video on Scroll
.player-container {
background-color: black;
}
.player-minimize .player-position {
background-color: white;
border-radius: 2px;
bottom: 20px;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.25);
left: 20px;
<?xml version="1.0" encoding="UTF-8"?>
<!--
SUMMARY:
- Structure: NML2 SNI Text
- Based On: NAR v1.2_1, NML2 v2.1_1
AUTHOR: thomsonreuters.com
-->
<!-- ========================================================= -->
<newsMessage xmlns="http://iptc.org/std/nar/2006-10-01/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rtr="http://www.reuters.com/ns/2003/08/content" xmlns:x="http://www.w3.org/1999/xhtml">
@nilesolutions
nilesolutions / sw.js
Created February 14, 2020 19:53 — forked from jarodium/sw.js
Service Worker
'use strict';
var cacheVersion = 1;
var currentCache = {
offline: 'offline-cache' + cacheVersion
};
const offlineUrl = 'offline.html';
this.addEventListener('install', event => {
event.waitUntil(
@nilesolutions
nilesolutions / semantic-html-ex5.html
Created January 13, 2020 19:16 — forked from michaelkornblum/semantic-html-ex5.html
Simple blogsite markup with Semantic HTML5 tags.
[...]
<div class="wrapper">
<header>
<h1>Logo</h1>
<nav>
<ul>
<li><a href="link-1.html">Link 1</a></li>
<li><a href="link-2.html">Link 2</a></li>
<li><a href="link-3.html">Link 3</a></li>
</ul>
@nilesolutions
nilesolutions / html5.html
Created January 13, 2020 19:15 — forked from sovietspy2/html5.html
the best of html5
<header>
<h1>Super duper best blog ever</h1>
<nav>
<a href="/">Home</a>
<a href="/about">About</a>
<a href="/archive">Archive</a>
</nav>
</header>
<main>
<article>
@nilesolutions
nilesolutions / ImageProcess.js
Created November 9, 2019 20:31 — forked from tpai/ImageProcess.js
Lambda function for create thumbnail.
// dependencies
var async = require('async');
var path = require('path');
var AWS = require('aws-sdk');
var gm = require('gm').subClass({
imageMagick: true
});
var util = require('util');
var LambdaWatermark = require('lambda-watermark');