Install, build and debug a react native app in WSL2 (Windows Subsystem for Linux) and Ubuntu.
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
" plugins | |
let need_to_install_plugins = 0 | |
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
let need_to_install_plugins = 1 | |
endif | |
call plug#begin() | |
Plug 'tpope/vim-sensible' |
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
# 1. First of all of course get Manjaro: | |
https://manjaro.org/get-manjaro/ | |
# I recommend using Etcher to copy the image to your USB: | |
https://etcher.io/ | |
# 2. Before installing make sure: | |
# - Secure boot is disabled in BIOS | |
# - Your SSD, HDD or NVME drive is set to AHCI instead of RAID | |
# - Fastboot should be on Auto or minimal, but this shouldn't matter to much |
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
LOGGING = { | |
'handlers': { | |
'logstash': { | |
'level': 'DEBUG', | |
'class': 'logstash.LogstashHandler', | |
'host': 'localhost', | |
'port': 5000, # Default port of logstash | |
'version': 1, # Version of logstash event schema. Default value: 0 (for backward compatibility of the library) | |
'message_type': 'logstash', # 'type' field in logstash message. Default value: 'logstash'. | |
'fqdn': False, # Fully qualified domain name. Default value: false. |
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 flask import Flask, request, jsonify, json, abort | |
from flask_cors import CORS, cross_origin | |
import pandas as pd | |
app = Flask(__name__) | |
cors = CORS(app) | |
app.config['CORS_HEADERS'] = 'Content-Type' |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# This is how I used it: | |
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history | |
import sys | |
import time | |
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
# Prepare pacman | |
sudo mkdir -p /root/.gnupg | |
sudo pacman-key --init && sudo pacman-key --populate archlinux manjaro && sudo pacman-key --refresh-keys | |
# Remove packages | |
sudo pacman -R empathy accerciser gnome-chess gnome-sudoku gnome-tetravex polari five-or-more four-in-a-row steam-native ipython hitori gnome-klotski steam quadrapassel gnome-nibbles aisleriot lightsoff gnome-mahjongg gnome-mines iagno gnome-robots tali swell-foop | |
# Upgrade all | |
sudo pacman -Syyu |
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
@REM adapted from http://stackoverflow.com/a/20092578 | |
if ["%VIRTUAL_ENV%"]==[""] echo Must run under a Virtualenv && goto :error | |
set SRCDIR=c:\Python27\Lib\site-packages | |
pushd "%VIRTUAL_ENV%\Lib\site-packages" | |
xcopy /ydfsi %SRCDIR%\MySQLdb MySQLdb | |
xcopy /ydfsi %SRCDIR%\_mysql* . | |
xcopy /ydfsi %SRCDIR%\MySQL_python-1.2.3-py2.7.egg-info MySQL_python-1.2.3-py2.7.egg-info | |
popd | |
goto :eof |
SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.
apt-get install sshpass
NewerOlder