Skip to content

Instantly share code, notes, and snippets.

@ubaierbhat
ubaierbhat / mssql-server-linux-fts.sh
Last active Oct 6, 2019 — forked from avernet/mssql-server-linux-fts.sh
SQL Server Docker instance with full-text search (FTS)
View mssql-server-linux-fts.sh
# 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 && \
View adb.bash
# /* 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 Nov 25, 2017 — forked from wazum/checkpoint.sh
Endpoint Security VPN FULL start/stop script for Mac OS X
View checkpoint.sh
#!/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 Jul 28, 2017
Example of pre-commit hook to test your code before making a commit
View pre-commit.sh
#!/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 Feb 21, 2017
Grant permissions for Android application
View build.gradle
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 Feb 3, 2017
Run tests with audio notifications on mac
View tests.sh
#!/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 Feb 1, 2017
Alternative to performing typeText in an Android Expresso test.
View SetTextAction.java
public class SetTextAction implements ViewAction {
private String stringToBeTyped;
public SetTextAction(String stringToBeTyped) {
this.stringToBeTyped = stringToBeTyped;
}
@Override
public Matcher<View> getConstraints() {
You can’t perform that action at this time.