code --list-extensions | xargs -L 1 echo code --install-extension
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
# ---- Base Node ---- | |
FROM ubuntu AS base | |
# install the core dependencies | |
RUN apt-get install -y my package list | |
# set working directory | |
WORKDIR /app | |
# copy project file | |
COPY Gemfile . | |
COPY Gemfile.lock |
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
public class Dependente { | |
public int getIdade() { return 123356777889; } | |
} | |
public abstract class Funcionario { | |
public boolean addDependente(Dependente dependente) { | |
if (dependentes.count() == 5) return false; | |
if (!dependenteValido(dependente)) return false; | |
dependentes.add(dependente); | |
} |
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
# docker run --rm -v "$(pwd):/api" -ti -w /api ruby:2.7-alpine sh | |
FROM ruby:2.7-alpine | |
EXPOSE 3000 | |
RUN apk --no-cache add alpine-sdk postgresql-dev tzdata | |
RUN mkdir /api | |
WORKDIR /api |
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
# from: http://www.rdoxenham.com/?p=259 | |
# Mine is Model Identifier: MacBookPro8,3 | |
system_profiler -detailLevel mini | grep "Model Identifier:" | |
cd /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources | |
sudo mv MacBookPro8_3.plist ~/Desktop | |
sudo reboot now |
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
version: "2" | |
services: | |
mssql: | |
image: microsoft/mssql-server-linux | |
volumes: | |
- mssql-volume:/var/opt/mssql | |
environment: | |
- ACCEPT_EULA=Y | |
- SA_PASSWORD=Test@123 |
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
# Rsync to remove old files | |
gsutil -m rsync -x '.git*' -c -d -r dist gs://bucket/ | |
# Upload and gzip HTML, CSS and JavaScript | |
gsutil -m cp -z "html,css,js" -r dist/** gs://bucket/ | |
# Set expires headers (6 months) on JS and CSS assets | |
gsutil -m setmeta -h "Cache-Control: public, max-age=15552000" gs://bucket/assets/** | |
# Make sure there's no expiration headers on HTML files |
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 Logging = require('@google-cloud/logging'); | |
// Your Google Cloud Platform project ID | |
const projectId = 'wiseup-102030'; | |
// Creates a client | |
const logging = new Logging({ | |
projectId: projectId, | |
}); |
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
{ | |
"X_GOOGLE_CODE_LOCATION": "/user_code", | |
"WORKER_PORT": "8091", | |
"X_GOOGLE_SUPERVISOR_INTERNAL_PORT": "8081", | |
"X_GOOGLE_WORKER_PORT": "8091", | |
"FUNCTION_IDENTITY": "teretete@appspot.gserviceaccount.com", | |
"X_GOOGLE_LOAD_ON_START": "false", | |
"GCLOUD_PROJECT": "project-id", | |
"X_GOOGLE_FUNCTION_REGION": "us-central1", | |
"FUNCTION_NAME": "function-name", |
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
#!/bin/bash | |
cat <<EOF | |
BOX RESET | |
========= | |
This script will cleal all user specific data in order to prepare the box | |
to have a new version generated |