Skip to content

Instantly share code, notes, and snippets.

View Briuor's full-sized avatar
🧙‍♂️

Bruno Lopes Briuor

🧙‍♂️
View GitHub Profile
@gjerokrsteski
gjerokrsteski / Dockerfile with multi-stage build for production
Last active December 13, 2023 01:21
Dockerfile with multi-stage build for dev and production
FROM node:12-alpine as base
WORKDIR /src
COPY package.json package-lock.json /src/
COPY . /src
EXPOSE 8080
FROM base as production
ENV NODE_ENV=production
@GusAntoniassi
GusAntoniassi / README.md
Created May 14, 2020 00:50
Play audio files on your microphone with ffmpeg

play-audio-mic.sh

This script was adapted to allow you to play audio files through your microphone input. It does so by creating a virtual microphone and piping an audio file to it.

The work was mostly done in this StackOverflow answer, I just adapted it to use ffmpeg and add a trap to cleanup on exit.

Requirements:

  • ffmpeg
  • Bash
  • PulseAudio/pactl
@nhtua
nhtua / 00.install-android-sdk.sh
Last active July 18, 2024 10:50
Run a Headless Android Device on Ubuntu server (no GUI)
#!/bin/bash -i
#using shebang with -i to enable interactive mode (auto load .bashrc)
set -e #stop immediately if any error happens
# Install Open SDK
apt update
apt install openjdk-8-jdk -y
update-java-alternatives --set java-1.8.0-openjdk-amd64
java -version
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active July 25, 2024 06:56
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active July 11, 2024 01:51
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"

@jjvillavicencio
jjvillavicencio / setup.sh
Last active July 23, 2024 21:17
Install Android SDK on Windows Bash (WSL)
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
@goodpic
goodpic / ProductScanRNCamera.js
Last active April 24, 2023 11:54
RNCamera : Use the barcode scanner on React Native
import React, { Component } from 'react';
import { Button, Text, View } from 'react-native';
import { RNCamera } from 'react-native-camera';
class ProductScanRNCamera extends Component {
constructor(props) {
super(props);
this.camera = null;
this.barcodeCodes = [];
@hubgit
hubgit / SelectField.tsx
Last active July 16, 2024 07:40
Use react-select with Formik
import { FieldProps } from 'formik'
import React from 'react'
import Select, { Option, ReactSelectProps } from 'react-select'
export const SelectField: React.SFC<ReactSelectProps & FieldProps> = ({
options,
field,
form,
}) => (
<Select
@diegopacheco
diegopacheco / pyaudio-ubuntu-install.md
Last active June 20, 2024 20:49
How to Install pyaudio ubuntu 16.04 LTS?
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
sudo apt-get install ffmpeg libav-tools
sudo pip install pyaudio
@h1st3r1cal
h1st3r1cal / index.html
Created December 22, 2016 15:00
Lo-Fi VHS Text
<section>
<div class="glitch">
<div class="text">
<span>WE ARE NOT LOOKING FOR FOLLOWERS.<br><br>WE ARE LOOKING FOR COLLABORATORS.</span>
</div>
</div>
</section>