Skip to content

Instantly share code, notes, and snippets.

const cdk = require("@aws-cdk/core");
const ec2 = require("@aws-cdk/aws-ec2");
const iam = require("@aws-cdk/aws-iam");
const ecs = require("@aws-cdk/aws-ecs");
const path = require("path");
const ecs_patterns = require("@aws-cdk/aws-ecs-patterns");
// Stack properties - what region to deploy to
const props = {
env: {
@srhise
srhise / package.json
Created January 30, 2014 00:59
Grunt package.json example
{
"name" : "MyTestProject",
"title" : "test",
"version" : "1.0.0",
"devDependencies": {
"grunt": "0.4.1",
"grunt-contrib-concat": "0.1.3",
"grunt-contrib-cssmin" : "0.6.1",
"grunt-contrib-watch" : "0.5.3",
"grunt-contrib-uglify" : "0.2.0"
<template>
<div class="grid">
<div class="column-headings">
<div class="column" v-for="column in columns">
{{column.name}}
<a v-if="column.sortable === true"><i class="fa fa-caret-down"></i></a>
</div>
</div>
<div class="grid-rows">
<div class="grid-row" v-for="row in data">
@srhise
srhise / WP_Meta_Query
Created January 7, 2014 02:33
Wordpress Query Examples
$meta_query_args = array(
'relation' => 'OR', // Optional, defaults to "AND"
array(
'key' => '_my_custom_key',
'value' => 'Value I am looking for',
'compare' => '='
)
);
$meta_query = new WP_Meta_Query( $meta_query_args );
@srhise
srhise / serviceworker.js
Last active December 8, 2015 03:30
serviceworker
/* in main.js it is successfully registering
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('js/serviceWorker.js').then(function(reg) {
// registration worked
console.log('Registration succeeded. Scope is ' + reg.scope);
}).catch(function(error) {
// registration failed
console.log('Registration failed with ' + error);
});
@srhise
srhise / remove non empty directory
Created September 9, 2014 13:57
SSH - Remove non empty directory
rm -rf <folder-name>
@srhise
srhise / SSH Upload
Last active August 29, 2015 14:06
Upload file via SSH
scp file-name.tar.gz user@xx.x.x.xx:/var/www
# param'd'#
mysql -h {hostname} -u {username}
# example #
mysql -h localhost -u root
# Edit PHP.INI
cd /etc/php5/apache2
sudo vi php.ini
# Restart Apache
sudo service apache2 restart