This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rabbitmqctl add_user admin admin | |
rabbitmqctl set_user_tags admin administrator | |
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title></title> | |
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
<style> | |
/* Style inputs with type="text", select elements and textareas */ | |
input[type=text], select, textarea { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var list = document.getElementsByTagName("section"); | |
var counter=0; | |
for (var i=0; i<list.length; i++) { | |
if ( list[i].className.match(/\bmodule\b/) ) { | |
var header_text = list[i].getElementsByTagName("h2")[0].innerText; | |
var ul = list[i].getElementsByClassName('clips'); | |
var li_list = ul[0].getElementsByTagName('h3'); | |
if ( li_list.length > 1 ) { | |
console.log("------" + header_text + "------"); | |
for (var y=0; y<li_list.length; y++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://www.quora.com/What-are-the-ways-to-download-videos-from-PluralSight | |
//1 | |
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
//2 | |
jQuery.noConflict(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--//SQL Database documentation script | |
--//Author: Nitin Patel, Email: nitinpatel31@gmail.com | |
--//Date:18-Feb-2008 | |
--//Description: T-SQL script to generate the database document for SQL server 2000/2005 | |
Declare @i Int, @maxi Int | |
Declare @j Int, @maxj Int | |
Declare @sr int | |
Declare @Output varchar(4000) | |
--Declare @tmpOutput varchar(max) | |
Declare @SqlVersion varchar(5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function preserveAspect() { | |
var scaled = $("#scaled"); | |
scaled.height("100%"); | |
scaled.width("100%"); | |
scaled.css("box-sizing", "border-box"); | |
var ratio = 16/9; | |
var w = scaled.outerWidth(); | |
var h = scaled.outerHeight(); | |
if (w > ratio*h) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT SchemaName , | |
TableName , | |
IndexName , | |
( CASE PK | |
WHEN 'PK' | |
THEN 'ALTER ' + 'TABLE ' + SchemaName + '.' + TableName | |
+ ' ADD CONSTRAINT ' + IndexName + ' PRIMARY KEY' | |
+ ( CASE SUBSTRING(Type, 3, 1) | |
WHEN 'C' THEN ' CLUSTERED' | |
ELSE '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.bountysource.com/issues/35584735-narrowing-the-serverless-iam-deployment-policy | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"cloudformation:Describe*", | |
"cloudformation:List*", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/bin | |
EC2_HOME=/opt/aws/apitools/ec2-1.7.3.0/ | |
JAVA_HOME=/usr/lib/jvm/jre | |
export EC2_HOME JAVA_HOME | |
instanceID=`curl http://169.254.169.254/latest/meta-data/instance-id` | |
echo "$instanceID" | |
region=`curl http://169.254.169.254/latest/dynamic/instance-identity/document | grep region | awk -F\" '{print $4}'` | |
echo "$region" |
OlderNewer