Skip to content

Instantly share code, notes, and snippets.

SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%search text%'
AND ROUTINE_TYPE='PROCEDURE'
@shiranGinige
shiranGinige / gist:ed908ef2c908e5807146c8a58651b14d
Last active May 3, 2017 07:01
Migrating VSTS TFS repo to Git
# Create a new Git Repository under the VSTS project you are working on (e.g. YourTeamProjectName below)
# Make sure you have chcolatey installed
# Install Git-TFS
> cinst Git-TF
# Init a git repo and apply TFS changesets
> git-tf clone https://your-tenant-name.visualstudio.com/ $/YourTeamProjectName/TFSBranchName --deep
# Add the remote
@shiranGinige
shiranGinige / gist:a856e8cfc2367e810002df1b9d936de1
Created September 26, 2016 20:49
Live streaming services - latency comparison
Azure Media Services ( with no live encoding) H264:360p : 640x360 - 30+ seconds
YouTube - 720p30x264 1.75 Mbps - 13 seconds
@shiranGinige
shiranGinige / GPIO.blink()
Created July 4, 2016 11:55
RasberryPi snippets - blinking LED
@shiranGinige
shiranGinige / update-configs.ps1
Created February 15, 2016 00:02
PS to update different configs
#set the value of this to your own db config
$myConnectionString = "Data Source=.;Initial Catalog=<<yourdatabase>>;Integrated Security=True";
$scriptDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$webConfig = $scriptDir + '\PeopleStreme.Api\Web.config'
$dbUpConfig = $scriptDir + '\PeopleStreme.Database\App.config'
$unitTestConfig = $scriptDir + '\Config\App.config'
@shiranGinige
shiranGinige / gist:1eb3ff34437350eef805
Last active February 1, 2016 03:08
Power-shell to update connection strings
#set the value of this to your own db config
$myConnectionString = "Data Source=.;Initial Catalog=<Database>;Integrated Security=True";
$webConfig = '.\Api\Web.config'
$dbUpConfig = '.\Database\App.config'
$unitTestConfig = '.\Test\App.config'
Function updateConfig($config)
{
select top 25
(total_logical_reads/execution_count) as avg_logical_reads,
(total_logical_writes/execution_count) as avg_logical_writes,
(total_physical_reads/execution_count) as avg_phys_reads,
Execution_count,
If rake preview fails with below error
Errno::ENOENT: No Such File or Directory - Jekyll ~
It is likely that with EI Capitan update changed the ruby version and rake command is no longer able to find it
I followed following steps
Install latest version
$ rvm install 2.2.3
@shiranGinige
shiranGinige / gist:9140270de9700e1d1edc
Last active August 29, 2015 14:18
AWS / EBS creating and attaching volumes
1. create the EBS volume /snapshot from the console and attach it with the instance
$ sudo mkfs -t ext3 /dev/sdf
$ sudo mkdir /mnt/data-store
$ sudo mount /dev/sdf /mount/data-store
2. to map a drive from a snapshot
- make the snapshot a volume from the console and attach it with the instance
@shiranGinige
shiranGinige / gist:a86ebed4cd9c0394d358
Created April 8, 2015 06:13
Get a PHP server running in AWS
1. Create the Ec2 instance
2. Connect to the server
ssh -i testpair.pem ec2-user@52.64.80.130
3. Update all packages
sudo yum update
4. Install php
sudo yum install php
5. edit the index.php file
cd var/www/html
vim index.php