Skip to content

Instantly share code, notes, and snippets.

View mrcat323's full-sized avatar

Mr CaT mrcat323

View GitHub Profile
@mrcat323
mrcat323 / inter.conf
Created January 22, 2023 11:20
Laravel + Nginx configuration
server {
listen 80;
root /var/www/inter/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.html index.htm index.php;
[Interface]
Address = 192.168.6.2/32
DNS = 1.1.1.1
PrivateKey = 2iXF7+fDsowIeqNnycBVYkfGXJ+YkwsHSgKfeqcGemA=
[Peer]
AllowedIPs = 0.0.0.0/0
Endpoint = 80.89.234.158:41194
PersistentKeepalive = 15
PublicKey = 6cZ2VS4akzKOnsKSOCYPb3jE9tCki/12Tec/KrObXWi=
@mrcat323
mrcat323 / config.yml
Created July 2, 2022 12:44
netplan thing
network:
version: 2
ethernets:
eno2:
dhcp4: true
enx00e04c3614bb:
dhcp4: true
addresses: [192.168.5.1/24]
gateway4: 192.168.5.1
nameservers:
@mrcat323
mrcat323 / nodejs-installer.sh
Last active January 20, 2023 12:15
Nodejs installer for ubuntu server
#!/bin/bash
cd $HOME
mkdir -v nodejs-thing && cd $_
wget https://nodejs.org/dist/v18.13.0/node-v18.13.0-linux-x64.tar.xz
tar xvf node-v18* && mv -v node-v18*/* .
rm -Rv node-v18*
echo "export PATH='$HOME/nodejs-thing/bin:$PATH'" >> $HOME/.bashrc
@mrcat323
mrcat323 / docker-compose.yml
Created November 18, 2021 06:52
some docker compose
version: '3.7'
services:
mysql:
image: mysql:5.7
container_name: mysql_db
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: jojo
ports:
- 3307:3006
@mrcat323
mrcat323 / react-es6-flow-emacs-configuration.md
Created October 2, 2021 11:06 — forked from CodyReichert/react-es6-flow-emacs-configuration.md
Configuring Emacs for react, es6, and flow

Configuring Emacs for react, es6, and flow

For a while, JSX and new es6 syntax had flaky support in emacs, but there's been huge work on a lot of packages. Using emacs for JavaScript with React, ES6, and Flow (or Typescript, etc) is really easy and powerful in Emacs these days.

This is how you can work on modern web development projects with full support for tooling like JSX, Flow types, live eslint errors, automatic prettier.js formatting, and more.

Set up web-mode

web-mode provides most of the underlying functionality, so a huge shout-out to the maintainer(s) there.

@mrcat323
mrcat323 / Change terminal git status.md
Last active March 29, 2021 17:00
Changing bash like a pro

I edited a bit @vankasteelj's stuff and made something like zsh, to react to git's changes image

If there are some changes then the color changes to orange or whatever, like in zsh (or fish also, I don't know) so, to do that, you need to create a function

function changes_in_branch() { 
    if [ -d .git ]; then
	if expr length + "$(git status -s)" 2>&1 > /dev/null; then     
 echo -ne "\033[0;33m$(__git_ps1)\033[0m"; 
@mrcat323
mrcat323 / vuetifyjs-login.html
Last active October 2, 2020 10:55 — forked from devinhyden/vuetifyjs-login.html
Vuetifyjs Login Form
<!DOCTYPE html>
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' rel="stylesheet">
<link href="https://unpkg.com/vuetify/dist/vuetify.min.css" rel="stylesheet">
</head>
<style>
#app {
db:
image: mysql:5.7
container_name: db_mysql
restart: unless-stopped
environment:
MYSQL_DATABASE: laravel
MYSQL_ROOT_PASSWORD: jojo
MYSQL_USER: root
MYSQL_PASSWORD: jojo
SERVICE_TAGS: dev
version: '3.7'
services:
app:
build:
args:
user: sammy
uid: 1000
context: ./
dockerfile: Dockerfile
image: app-laravel