Skip to content

Instantly share code, notes, and snippets.

View mikaoelitiana's full-sized avatar

Mika Andrianarijaona mikaoelitiana

View GitHub Profile
@straubt1
straubt1 / Terraform on Mac M1.md
Created June 14, 2022 18:38
Notes to install Terraform on M1

Installing the amd64 version of Terraform on Mac with M1

Not all Terraform providers are built for arm64.

One solution here is to install Terraform as amd64 which can be easily done from the downloads page.

However, for those who are using and switching between versions of Terraform often, a more streamlined approach is desirable.

Enter asdf.

@nandorojo
nandorojo / private-npm-in-gh-actions.md
Created August 3, 2021 23:52
Use private NPM packages in your GitHub actions

1 NPM_TOKEN

Add an NPM_TOKEN secret on GitHub. Get your secret key from the NPM dashboard.

2 Add a step to your action

- name: Authenticate with private NPM package
  run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
@osartun
osartun / coderPadTSTestUtils.ts
Last active March 22, 2024 22:46
Test utilities for TypeScript pads on CoderPad
/**
* You want to use mocha in a TypeScript CoderPad but you get the error
* message that `describe` isn't defined even though you're already using
* the `mocha.suite.emit('pre-require', this, 'solution', mocha)` hack?
*
* > Cannot find name 'describe'. Do you need to install type definitions
* > for a test runner? Try `npm i --save-dev @types/jest` or
* > `npm i --save-dev @types/mocha`.
*
* Here are a couple of lines to copy & paste into your pad to use
@dvf
dvf / change-codec.md
Last active July 17, 2024 10:16
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@jtumano
jtumano / init.vim
Last active October 29, 2022 03:25
Neovim coc config for frontend development
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
" ---
Plug 'scrooloose/nerdtree' " NERD Tree
Plug 'Xuyuanp/nerdtree-git-plugin' " show git status in Nerd tree
@barsumek
barsumek / introspectionQuery.txt
Created November 22, 2018 12:42
Detox your GraphQL: Introspection Query
query IntrospectionQuery {
__schema {
queryType {
name
}
mutationType {
name
}
types {
...FullType
@jmichealson
jmichealson / user-data.txt
Last active September 5, 2018 09:41 — forked from heri16/user-data.txt
Docker-CE Cloud-init for Ubuntu 16.04 (LTS)
#cloud-config
# Upgrade the instance on first boot
# (ie run apt-get upgrade)
#
# Default: false
# Aliases: apt_upgrade
package_upgrade: true
# Install additional packages on first boot
@zulhfreelancer
zulhfreelancer / README.md
Last active January 28, 2021 22:33
How to install Flynn on single host (single-node mode)?

$ sudo bash -c "$(curl -s https://gist.githubusercontent.com/zulhfreelancer/0b87a274686cb4d98b8144e116c5117c/raw)"

@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active July 22, 2024 17:14
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@welcoMattic
welcoMattic / imagemin.md
Last active February 15, 2022 20:58
How to fix `Error: spawn ./node_modules/jpegtran-bin/vendor/jpegtran ENOENT` error for imagemin

If you're trying to run imagemin (from grunt or gulp or anything else) on Alpine, you certainly had to meet this error :

Error: spawn /YOUR_PROJECT_PATH/node_modules/jpegtran-bin/vendor/jpegtran ENOENT or the same with optipng or gifsicle instead of jpegtran.

Here's how to solve it.

First you need to install on Alpine missing package used to compile jpegtran, gifsicle and optipng binaries. Those packages are (at least):

autoconf automake file build-base nasm musl libpng-dev zlib-dev