Skip to content

Instantly share code, notes, and snippets.

@ubaierbhat
ubaierbhat / mssql-server-linux-fts.sh
Last active October 6, 2019 20:42 — forked from avernet/mssql-server-linux-fts.sh
SQL Server Docker instance with full-text search (FTS)
# mssql-agent-fts-ha-tools
# Maintainers: Microsoft Corporation (LuisBosquez and twright-msft on GitHub)
# GitRepo: https://github.com/Microsoft/mssql-docker
# Base OS layer: Latest Ubuntu LTS + mssql-server-linux (SQL Server engine + tools)
FROM microsoft/mssql-server-linux
#Install curl since it is needed to get repo config
# Get official Microsoft repository configuration
RUN export DEBIAN_FRONTEND=noninteractive && \
# /* vim: set ai ts=4 ft=sh: */
#
# Copyright 2011, The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@ubaierbhat
ubaierbhat / checkpoint.sh
Created November 25, 2017 17:48 — forked from wazum/checkpoint.sh
Endpoint Security VPN FULL start/stop script for Mac OS X
#!/bin/bash
#
# The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext
# which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just
# from time to time
# Usage: checkpoint.sh load|unload
# You will need sudo power, of course
#
if [ $1 == "unload" ]
@ubaierbhat
ubaierbhat / pre-commit.sh
Last active July 28, 2017 16:02
Example of pre-commit hook to test your code before making a commit
#!/usr/bin/env bash
# pre-commit.sh
git stash -q --keep-index
./gradlew test
RESULT=$?
echo "Result = " $RESULT
git stash pop -q
[ $RESULT -ne 0 ] && echo "Tests failed -- commit aborted" && exit 1
exit 0
@ubaierbhat
ubaierbhat / build.gradle
Created February 21, 2017 18:44
Grant permissions for Android application
android.applicationVariants.all { variant ->
// Create tasks for granting permissions
def applicationId = variant.applicationId
def variantName = variant.name.capitalize()
def grantPermissionTask = tasks.create("grant${variantName}Permissions") << {
"${adb} devices".execute().text.eachLine {
if (it.endsWith("device")) {
def device = it.split()[0]
println "Granting permissions on devices ${device}"
def permissions = ['SET_ANIMATION_SCALE',
@ubaierbhat
ubaierbhat / tests.sh
Created February 3, 2017 15:51
Run tests with audio notifications on mac
#!/bin/bash
function testApp {
time \
./runTests.sh && \
say -v Moira "Tests passed. You are the best" || \
say -v Moira "Tests failed. Shame on you"
}
@ubaierbhat
ubaierbhat / SetTextAction.java
Created February 1, 2017 15:37
Alternative to performing typeText in an Android Expresso test.
public class SetTextAction implements ViewAction {
private String stringToBeTyped;
public SetTextAction(String stringToBeTyped) {
this.stringToBeTyped = stringToBeTyped;
}
@Override
public Matcher<View> getConstraints() {