Skip to content

Instantly share code, notes, and snippets.

View ThiagoBarradas's full-sized avatar
👽
em marte!

Thiago Barradas ThiagoBarradas

👽
em marte!
View GitHub Profile
@MatMercer
MatMercer / wsl-vpn-fix.sh
Last active August 23, 2022 06:24
Fix WSL 2 DNS resolution when connected to Cisco AnyConnect VPN
#!/bin/bash
#--------------------------------------------------------------------------------#
# #
# Fix WSL DNS resolution with Cisco AnyConnect #
# #
# ! Don't forget to set this configuration in /etc/wsl.conf: #
# [network] #
# generateResolvConf = false #
# #
# Based on: #

SELECT (1-filter(uniqueCount(uuid), WHERE category='Crash') / uniqueCount(uuid)) * 100 as Crash Free FROM MobileSession, MobileCrash WHERE crashFingerprint NOT IN () where appName like 'PROD%' SINCE 1 week AGO LIMIT 1000

SELECT average(cpuPercent) AS '' FROM SystemSample FACET entityId SINCE 1 hour ago

SELECT average(databaseCallCount) FROM Transaction SINCE last month until this month COMPARE WITH 1 month ago WITH TIMEZONE 'Europe/London'

SELECT average(databaseDuration) FROM Transaction SINCE last month until this month COMPARE WITH 1 month ago WITH TIMEZONE 'Europe/London'

SELECT average(duration+backendDuration) AS 'Total', average(duration) AS 'Frontend', average(backendDuration) AS 'Backend' FROM PageView WHERE countryCode = 'NZ' AND appName = 'appname' SINCE 1 day ago

@leomelzer
leomelzer / Dockerfile
Last active March 9, 2022 19:18
Install private NPM dependencies using git+ssh on Now. Based on https://zeit.co/blog/build-env to work around missing support for git+ssh dependencies in now@2 (https://github.com/zeit/now-builders/issues/49)
# This is a multi-stage build to not spill the contents of the deploy_key
FROM mhart/alpine-node:10 as base
# We need git and openssh to resolve `git+ssh` links in package.json
RUN apk update \
&& apk add git openssh
WORKDIR /usr/src
COPY package*.json ./
@nfekete
nfekete / wsl-fix-resolvconf.sh
Created August 8, 2018 03:05
Fix resolv.conf in Windows Subsystem for Linux, when WSL doesn't correctly generate it.
#!/bin/bash
TMP=`mktemp`
trap ctrlC INT
removeTempFiles() {
rm -f $TMP
}
ctrlC() {
@ThiagoBarradas
ThiagoBarradas / config.yml
Created March 16, 2018 19:07
Auto rollback with circleci 2.0
## 1) GENERATE AN API TOKEN (https://circleci.com/gh/<gh-user>/<gh-repo-name>/edit#api)
## 2) ADD ENV VAR WITH NAME "CIRCLE_API_TOKEN" WITH PREVIOUS GENERATED TOKEN
version: 2
jobs:
build:
machine: true
steps:
- run:
name: Build App