Skip to content

Instantly share code, notes, and snippets.

View gawrkai's full-sized avatar

田中 海 gawrkai

View GitHub Profile
@gawrkai
gawrkai / create_a_virtual_environment_with_python.md
Created September 21, 2023 12:30 — forked from loic-nazaries/create_a_virtual_environment_with_python.md
Markdown file to help create a virtual environment with Python.

Create a Virtual Environment with Python

The present gist is a hybrid between a 'go-to' cheat sheet and a tutorial when starting a new Data Science Project.

Its purpose is to create a virtual environment with Python using the 'venv' module.

 


@gawrkai
gawrkai / php-docker-ext
Created May 18, 2023 13:27 — forked from hoandang/php-docker-ext
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@gawrkai
gawrkai / apk flags.md
Created May 16, 2023 11:21 — forked from sgreben/apk flags.md
apk flags

apk

apk-tools 2.8.2, compiled for x86_64.

usage: apk COMMAND [-h|--help] [-p|--root DIR] [-X|--repository REPO] [-q|--quiet] [-v|--verbose] [-i|--interactive] [-V|--version] [-f|--force]
           [--force-binary-stdout] [--force-broken-world] [--force-non-repository] [--force-old-apk] [--force-overwrite] [--force-refresh] [-U|--update-cache]
           [--progress] [--progress-fd FD] [--no-progress] [--purge] [--allow-untrusted] [--wait TIME] [--keys-dir KEYSDIR] [--repositories-file REPOFILE]
           [--no-network] [--no-cache] [--cache-dir CACHEDIR] [--arch ARCH] [--print-arch] [ARGS]...
@gawrkai
gawrkai / server.conf
Created May 15, 2023 15:45 — forked from iliakan/server.conf
Nginx configuration for separated frontend and backend endpoints
upstream example-webpack {
server 127.0.0.1:8080;
}
upstream example-backend {
server 127.0.0.1:3000;
}
server {
listen 80;
@gawrkai
gawrkai / cookbook.sql
Created April 11, 2023 08:08 — forked from greghelton/cookbook.sql
MySQL Database for Cookbook, Recipes, Ingredients
-- start the server: $ mysqld --console
-- login: $ mysql -u root --password=wxyz
-- run the script: mysql> source /Users/javapro/dev/src/sql/Cookbook.sql
-- the script:
drop database if exists Cookbook;
create database Cookbook;
connect Cookbook;
@gawrkai
gawrkai / eslint_prettier_airbnb.md
Created August 1, 2022 21:34 — forked from geordyjames/eslint_prettier_airbnb.md
VSCode - ESLint, Prettier & Airbnb Setup for Node.js Projects

VSCode - ESLint, Prettier & Airbnb Setup for Node.js Projects

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-config-airbnb-base eslint-plugin-node eslint-config-node
@gawrkai
gawrkai / php-interview.md
Created February 10, 2022 08:41 — forked from messified/php-interview.md
PHP Engineer Interview: What you should know

PHP Developer Interview: What you should know

1. What’s the difference between " self " and " this " ?

Use $this to refer to the current object. Use self to refer to the current class. In other words, use $this->member for non-static members, use self::$member for static members.

Source: When to use self vs this -stackoverflow

@gawrkai
gawrkai / script.sh
Created May 21, 2021 01:11 — forked from vielhuber/script.sh
PostgreSQL: Backup and restore export import pg_dump with password on command line #sql
# best practice: linux
nano ~/.pgpass
*:5432:*:username:password
chmod 0600 ~/.pgpass
# best practice: windows
edit %APPDATA%\postgresql\pgpass.conf
*:5432:*:username:password
# linux
@gawrkai
gawrkai / BackUpDatabase.php
Created May 20, 2021 22:24 — forked from hungthai1401/BackUpDatabase.php
Laravel command backup, restore postgresql database
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Process\Process;
use Symfony\Component\Process\Exception\ProcessFailedException;
class BackUpDatabase extends Command
{