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
#!/usr/bin/env bash | |
set -v -e | |
BASEDIR=$(dirname "$0") | |
echo "$BASEDIR" | |
# Get link for latest release .deb package | |
URL=$(curl -s "https://api.github.com/repos/docker/kitematic/releases/latest" | grep browser_download_url | grep Ubuntu | cut -d '"' -f 4) | |
ZIPFILE=$(basename "${URL}") | |
curl --fail -LO "$URL" --output "${BASEDIR}/${ZIPFILE}" |
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
Section "InputClass" | |
Identifier "Marble Mouse" | |
MatchProduct "Logitech USB Trackball" | |
Driver "libinput" | |
Option "ScrollMethod" "button" | |
Option "ScrollButton" "8" | |
Option "MiddleEmulation" "on" | |
EndSection |
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
# Import module on shell | |
Import-Module posh-git | |
# Chocolatey tab completion | |
Import-Module “$env:ChocolateyInstall\helpers\chocolateyProfile.psm1” | |
# Function for load Developer Command Prompt for VS 2017 executables, Community Edition | |
function Load-VSDev { | |
Push-Location "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools" | |
cmd /c "VsDevCmd.bat&set" | |
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
void printArray(char arr[], int size){ | |
for (int i = 0; i < size; ++i) | |
{ | |
printf("%c", arr[i]); | |
} | |
printf("\n"); | |
} |
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
#!/usr/bin/env bash | |
JDKS_DIR="/Library/Java/JavaVirtualMachines" | |
JDKS=( $(ls ${JDKS_DIR}) ) | |
JDKS_STATES=() | |
# Map state of JDK | |
for (( i = 0; i < ${#JDKS[@]}; i++ )); do | |
if [[ -f "${JDKS_DIR}/${JDKS[$i]}/Contents/Info.plist" ]]; then | |
JDKS_STATES[${i}]=enable |
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
const get = (p, o) => p.reduce((xs, x) => (xs && xs[x]) ? xs[x] : null, o); |
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 AWS = require('aws-sdk'); | |
var region = ''; // e.g. us-west-1 | |
var domain = ''; // e.g. search-domain.region.es.amazonaws.com | |
var index = 'node-test'; | |
var type = '_doc'; | |
var id = '1'; | |
var json = { | |
"title": "Moneyball", | |
"director": "Bennett Miller", |
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
#!/usr/bin/env bash | |
TARGET=$(git describe --dirty --broken --all --long); | |
PROJECT=$(git config remote.origin.url |sed 's#.*\/\(.*\)\.git#\1#'); | |
git pull && \ | |
curl -i \ | |
-H "Content-Type:application/json" \ | |
-X POST \ | |
-d "{\"text\": \"deployed \`${PROJECT}\` \`$TARGET\` to \`$1\` \"}" \ |
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
import traceResolvers from '@lifeomic/graphql-resolvers-xray-tracing'; | |
// Apply tracing middleware if running Lambda environment | |
if (process.env.AWS_LAMBDA_FUNCTION_NAME) { | |
traceResolvers(schema); | |
} | |
const apolloServer = new ApolloServer({ | |
schema, | |
context: contextFn, |
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
/// Setup tracing in a separate file | |
import * as AWSXRay from 'aws-xray-sdk-core'; | |
// Configure the context missing strategy to do nothing | |
// https://docs.aws.amazon.com/lambda/latest/dg/nodejs-tracing.html | |
AWSXRay.setContextMissingStrategy(() => { }); | |
// https://github.com/aws/aws-xray-sdk-node/issues/143 | |
AWSXRay.captureAWS(require('aws-sdk')); |
OlderNewer