Skip to content

Instantly share code, notes, and snippets.

@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active April 16, 2024 14:43
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@sethwebster
sethwebster / README.md
Last active April 12, 2023 19:06
Make Docker Cache Gem Installs to speed up Bundle Install

Gem Install Dockerfile Hack

If you're hacking on your Gemfile and using Docker, you know the pain of having the bundle install command run after you've added or removed a gem. Using docker-compose you could mount a volume and stage your gems there, but this adds additional complexity and doesn't always really solve the problem.

Enter this imperfect solution:

What if we installed every gem into it's own Docker layer which would be happily cached for us?

gem-inject-docker does just that. It takes the list of gems used by your app via bundle list and transforms it into a list of RUN gem install <your gem> -v <gem version> statements and injects them into the Dockerfile at a point of your choosing.

@ivaravko
ivaravko / terraform-kubernetes-docker-macos.md
Last active April 10, 2024 00:17
The simple Terraform and Kubernetes with Docker on macOS

If you'd like to experiment with Terraform and Kubernetes on macOS locally, a great provider for doing so is the Kubernetes provider. You can get set up in a few simple steps, like so:

1. Install Docker

Install Docker for Mac if you have not already.

@mrmartineau
mrmartineau / stimulus.md
Last active April 19, 2024 09:41
Stimulus cheatsheet
@ar-android
ar-android / default
Created February 9, 2017 13:56 — forked from dtomasi/default
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@gene1wood
gene1wood / all_aws_managed_policies.json
Last active April 4, 2024 18:11
A list of all AWS managed policies and they're policy documents as well as a short script to generate the list
This file has been truncated, but you can view the full file.
{
"APIGatewayServiceRolePolicy": {
"Arn": "arn:aws:iam::aws:policy/aws-service-role/APIGatewayServiceRolePolicy",
"AttachmentCount": 0,
"CreateDate": "2019-10-22T18:22:01+00:00",
"DefaultVersionId": "v6",
"Document": {
"Statement": [
{
"Action": [
@danharper
danharper / CatchAllOptionsRequestsProvider.php
Last active May 23, 2022 04:03
Lumen with CORS and OPTIONS requests
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
/**
* If the incoming request is an OPTIONS request
* we will register a handler for the requested route
*/
class CatchAllOptionsRequestsProvider extends ServiceProvider {
@ruph
ruph / .vimrc
Last active February 27, 2024 15:20
vim settings
" Use vim settings, rather then vi settings (much better!)
" This must be first, because it changes other options as a side effect.
set nocompatible
set t_Co=256 " iTerm2 supports 256 color mode.
set ai " auto indenting
set history=100 " keep 100 lines of history
set ruler " show the cursor position
syntax on " syntax highlighting
filetype plugin on " use the file type plugins