Skip to content

Instantly share code, notes, and snippets.

View FromSi's full-sized avatar
:octocat:

FromSi

:octocat:
  • @skycoach.gg
  • Nur-Sultan, Kazakhstan
  • 15:04 (UTC +05:00)
View GitHub Profile
@fomvasss
fomvasss / REST API.md
Last active March 27, 2024 16:36
Best practices Laravel Rest API

Best practices написание REST-API

  • Имена полей в ответе задавать в snake_case (prr_page, created_at, system_name,...)
  • Для времени использовать ISO 8601 (формат: YYYY-MM-DDTHH:MM:SSZ)
  • Отдавать данные (сам контент, поля сущностей, массивы сущностей), помещая их в data

Использование REST методов и примеры url'ов

  • GET: /api/users — получить список пользователей;
  • GET: /api/users/123 — получить указанного пользователя;
  • POST: /api/users — создать нового пользователя;
@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@asukakenji
asukakenji / 0-go-os-arch.md
Last active March 25, 2024 01:40
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@mykubicle
mykubicle / docker_mint_xenial_install.sh
Last active March 14, 2024 23:23
Get Docker CE for Linux Mint based on Ubuntu Xenial
#!/bin/bash
# Uninstall old version
sudo apt-get remove docker docker-engine docker.io
# Update apt package index
sudo apt-get update
# Install packages to allow apt to use a repo over HTTPS
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
# Add Docker offical GPG Key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
@dianjuar
dianjuar / android_on_arch.md
Created April 10, 2017 03:22
install android SDK on arch linix

Install Android SDK on Arch Linux

1. Download Android SDK on your computer

yaourt android-sdk-platform-tools
yaourt android-udev
yaourt android-sdk

2. Create global variables on system

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/Book</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password"></property>
@giansalex
giansalex / docker-php-ext-install.md
Last active October 3, 2023 10:02
docker-php-ext-install Reference
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
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/ 
@guinso
guinso / MixedWebHosting.go
Last active March 14, 2021 16:39
Example hosting Golang web server where supporting both static file and dynamic request (REST)
/**
This web server serve 2 different type request: [static file] and [dynamic path]
[Static file] URL path: /*
[Dynamic Path] URL path: /api/*
Preparation:
1) Create "static-files" directory to place all static file like index.html
2) Create "dynamic-files" diectory to place all dynamic or hidden logical files, example invoice.pdf
3) Place "index.html" at root of "static-files" directory
4) Place "neon.jpg" (any kind of JPEG file) at root of "dynamic-files" directory