Skip to content

Instantly share code, notes, and snippets.

View dan-developer's full-sized avatar
🎯
Focusing

Anderson Scouto da Silva (Dan) dan-developer

🎯
Focusing
View GitHub Profile
@toricls
toricls / lima-on-m1-mac-installation-guide.md
Last active November 9, 2024 23:03
Using Lima to run containers with containerd and nerdctl (without Docker Desktop) on M1 Macs

Lima (Linux virtual machines, on macOS) installation guide for M1 Mac.

Sep. 27th 2021 UPDATED

Now we can install patched version of QEMU via Homebrew (thank you everyone for the info!). Here is the updated instruction with it:

Used M1 Mac mini 2020 with macOS Big Sur Version 11.6.

1. Install QEMU & Lima

@Pasi-D
Pasi-D / helpers\accessEnv.ts
Last active March 23, 2024 20:23
React Native env accessor and version name displayer
/*****************************************************************************************
* Accesses a variable inside of .env file and cache for later usage; throws an error if its not found.
*
* caching the values to improve the performance.
*
* Usage:
*
* import accessEnv from "helpers/accessEnv";
*
* const redirectionHost = accessEnv("MAJOR_VERSION", 1);
@justinhartman
justinhartman / 01_nginx-reload-post-hook.sh
Last active August 13, 2024 15:29
Let's Encrypt Certbot post hook command for Nginx which checks the updated configuration files and reloads the server if everything validates.
#!/usr/bin/env bash
#
# Certbot Nginx Reload
#
# Let's Encrypt Certbot post hook command for Nginx which checks the updated
# configuration files and reloads the server if everything validates.
#
# Author : Justin Hartman <[email protected]>
# Version : 1.0.1
# License : MIT <https://opensource.org/licenses/MIT>
@citruz
citruz / QEMU_ON_M1.md
Last active October 24, 2024 02:17
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

@niw
niw / README.en.md
Last active October 24, 2024 03:04
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!

NOTE: that this is current, 10/1/2021 state.

Running Windows 10 on ARM

  1. Install Xcode from App Store or install Command Line Tools on your Mac
@singh100ful
singh100ful / ImageUploadForm.js
Created May 30, 2020 22:30
React Native Image Picker Form Using Formik
import React, {Component} from 'react';
import {Formik} from 'formik';
import ImagePicker from 'react-native-image-picker';
import {
View,
Text,
TouchableOpacity
} from 'react-native';
export deafault class App extends Component {
@avishayp
avishayp / Dockerfile
Created September 25, 2018 19:02
Add non-root user for alpine linux
# non root user example for alpine
#
# usage:
# $ docker build --build-arg "USER=someuser" --tag test .
# $ docker run --rm test
FROM alpine
ARG USER=default
ENV HOME /home/$USER
# Code adapted from Tensorflow Object Detection Framework
# https://github.com/tensorflow/models/blob/master/research/object_detection/object_detection_tutorial.ipynb
# Tensorflow Object Detection Detector
import numpy as np
import tensorflow as tf
import cv2
import time
@iamstoick
iamstoick / import.md
Created June 14, 2017 05:03
How to import database in MySQL in Docker?

This is a simple way of importing MySQL database in Docker.

  1. In you Dockerfile you must have a shared folder. Shared folder is a directory in your host machine that is mounted to Docker instance.

  2. Put the exported sql file in the shared folder.

  3. Login to your Docker instance via docker exec -it DOCKER_CONTAINER_ID bin/bash.

  4. Login to MySQL via mysql -u USERNAME -p.

# QEmu
brew install qemu
# Home for out tests
mkdir ~/arm-emu
cd ~/arm-emu
# Download initrd and kernel
wget http://ftp.de.debian.org/debian/dists/jessie/main/installer-armel/current/images/versatile/netboot/initrd.gz