Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@I90Runner
I90Runner / FinancialReports.sql
Created January 29, 2013 22:23
Financial Reporting for LXHub
CREATE OR REPLACE VIEW `vw_ExpReporting` AS
select distinctrow tik.activity_id as ActivityID
, pm1.meta_value as RootActivityID
, p.post_title as ActivityTitle
, tik.sale_ID as SaleID
, tik.sale_Date as SaleDate
, tik.ID as TicketID
, tik.activity_timestamp as ActivityTimestamp
, tik.destination as Destination
, tik.act_ticket_amt as TicketAmount
@I90Runner
I90Runner / SQLBak-Dynamic-Restore.sql
Last active July 28, 2016 15:14
Dynamically Restore SQL Database
/******************************************************************************************************
** Project: Operations
** Issue: Restore Database from Backup file
** ShortDesc: Restore Database From Backup File and Dynamically move data and log files to Default Location.This is intended for single data and log file Databases.
** Auth: EMETRIC\rvenkataraman
** Date: 2016-07-25 Created
** Description: Restore Database From Backup File and Dynamically move data and log files to Default Location.This is intended for single data and log file Databases.
**************************
** Change History
**************************
@I90Runner
I90Runner / Get-SQLServer-SystemInfo.sql
Created July 25, 2016 22:40
Gather SQL Server System Level Information
/******************************************************************************************************
** Project: Operations
** Issue: Gather SQL Server System Information
** ShortDesc: Gather SQL Server System Information. These commands usually gets executed by SQL Server during startup
** Auth: Raju Venkataraman
** Date: 2016-07-25 Created
** Description: Gather SQL Server System Information. These commands usually gets executed by SQL Server during startup
**************************
** Change History
**************************

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@I90Runner
I90Runner / Script_Template.ps1
Created January 31, 2018 17:47 — forked from 9to5IT/Script_Template.ps1
PowerShell: Script Template
#requires -version 2
<#
.SYNOPSIS
<Overview of script>
.DESCRIPTION
<Brief description of script>
.PARAMETER <Parameter_Name>
<Brief description of parameter input required. Repeat this attribute if required>
# Your account access key - must have read access to your S3 Bucket
$accessKey = "YOUR-ACCESS-KEY"
# Your account secret access key
$secretKey = "YOUR-SECRET-KEY"
# The region associated with your bucket e.g. eu-west-1, us-east-1 etc. (see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-regions)
$region = "eu-west-1"
# The name of your S3 Bucket
$bucket = "my-test-bucket"
# The folder in your bucket to copy, including trailing slash. Leave blank to copy the entire bucket
$keyPrefix = "my-folder/"
@I90Runner
I90Runner / Script-Template-WithCreds.ps1
Created February 1, 2018 02:00 — forked from davefunkel/Script-Template-WithCreds.ps1
PowerShell Script Template with Saved Creds
<#
.SYNOPSIS
The synopsis goes here. This can be one line, or many.
This version of the template has inbuilt functions to capture credentials and store it securely for reuse
Avoids the need to have plaintext passwords in the script
.DESCRIPTION
The description is usually a longer, more detailed explanation of what the script or function does.
Take as many lines as you need.
@I90Runner
I90Runner / Get-VCEvents.ps1
Created February 3, 2018 04:14 — forked from 9to5IT/Get-VCEvents.ps1
PowerShell: Collect vCenter Events
#-----------------------------------------------------------------------------
# Import PowerCLI Module
#-----------------------------------------------------------------------------
Add-PSSnapin VMware.VimAutomation.Core
#-----------------------------------------------------------------------------
# Connect to vCenter Server
#-----------------------------------------------------------------------------
$Server = Read-Host 'Specify the vCenter Server or ESXi Host to connect to (IP or FQDN)?'
Connect-VMwareServer -VMServer $Server
@I90Runner
I90Runner / Send-Email.ps1
Created February 3, 2018 04:15 — forked from 9to5IT/Send-Email.ps1
PowerShell: Send Email
Function Send-Email{
<#
.SYNOPSIS
Used to send data as an email to a list of addresses
.DESCRIPTION
This function is used to send an email to a list of addresses. The body can be provided in HTML or plain-text
.PARAMETER EmailFrom
Mandatory. The email addresses of who you want to send the email from. Example: "admin@9to5IT.com"
@I90Runner
I90Runner / nginx.default.conf
Created March 3, 2018 21:16 — forked from sumardi/nginx.default.conf
Install PHP-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php-fpm
# Install PHP extensions
sudo yum install -y php-devel php-mysql php-pdo \
php-pear php-mbstring php-cli php-odbc \