Skip to content

Instantly share code, notes, and snippets.

@Daniyal-Javani
Daniyal-Javani / docker-compose.yml
Last active Feb 22, 2021
Laravel sail with phpMyAdmin
View docker-compose.yml
version: '3'
services:
laravel.test:
build:
context: ./vendor/laravel/sail/runtimes/8.0
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
image: sail-8.0/app
environment:
@Daniyal-Javani
Daniyal-Javani / gist:b990a892e55bf319274964aa2047b44a
Created Apr 26, 2020
root user for phpmyadmin in Ubuntu 20.04
View gist:b990a892e55bf319274964aa2047b44a
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
View gist:1e7843b97f46a9e7fb370457910253ff
true == function()
{
var MinPrice = function() {
var min = [ih][0].PriceMin;
var ipos;
for (ipos = 0; ipos < 21; ipos++)
if (min > [ih][ipos].PriceMin)
min = [ih][ipos].PriceMin;
return min;
View openapi 3 crud example
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Swagger Faqstore",
"description": "A sample API that uses a faqstore as an example to demonstrate features in the OpenAPI 3.0 specification",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Swagger API Team",
"email": "apiteam@swagger.io",
View cloudSettings
{"lastUpload":"2020-12-05T12:10:20.620Z","extensionVersion":"v3.4.3"}
View Default (Linux).sublime-keymap
[
{ "keys": ["ctrl+shift+r"], "command": "reindent"},
{ "keys": ["f8"], "command": "find_use"},
{
"keys": ["super+shift+w"],
"command": "toggle_setting",
"args": {
"setting": "word_wrap"
}
}
@Daniyal-Javani
Daniyal-Javani / permissions
Last active Apr 28, 2020
Set up File Permissions for Laravel
View permissions
sudo chown -R $USER:www-data .
sudo find . -type f -exec chmod 664 {} \;
sudo find . -type d -exec chmod 775 {} \;
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
View xmrig.service
[Unit]
Description=XMRig Daemon
After=network.target
[Service]
Type=simple
GuessMainPID=no
ExecStart=/home/vahid/xmrig/build/xmrig -a cryptonight -o stratum+tcp://xmr.pool.minergate.com:45700 -u daniyal.javani@gmail.com -p x -t 2 --donate-level 1
Restart=on-failure
@Daniyal-Javani
Daniyal-Javani / config
Created Feb 16, 2019
SSh config to use proxy for certain host ~/.ssh/config
View config
Host gitlab.com
User git
ProxyCommand nc -x 127.0.0.1:1080 %h %p
@Daniyal-Javani
Daniyal-Javani / chromium-browser.desktop
Created Dec 10, 2018
Chromium .desktop with proxy
View chromium-browser.desktop
[Desktop Entry]
Version=1.0
Name=Chromium Web Browser
Name[ast]=Restolador web Chromium
Name[bg]=Уеб четец Chromium
Name[bn]=ক্রোমিয়াম ওয়েব ব্রাউজার
Name[bs]=Chromium web preglednik
Name[ca]=Navegador web Chromium
Name[ca@valencia]=Navegador web Chromium
Name[da]=Chromium netbrowser