Skip to content

Instantly share code, notes, and snippets.

@Daniyal-Javani
Daniyal-Javani / config.json
Created October 2, 2021 06:46
Docker proxy
home/daniyal/.docker/config.json
{
"proxies": {
"default": {
"httpProxy": "http://172.17.0.1:8118",
"httpsProxy": "http://172.17.0.1:8118"
}
}
}
@Daniyal-Javani
Daniyal-Javani / docker-compose.yml
Last active July 3, 2024 16:34
Laravel sail with phpMyAdmin
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 April 26, 2020 05:02
root user for phpmyadmin in Ubuntu 20.04
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
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;
{
"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": "[email protected]",
{"lastUpload":"2020-12-05T12:10:20.620Z","extensionVersion":"v3.4.3"}
@Daniyal-Javani
Daniyal-Javani / Default (Linux).sublime-keymap
Last active July 18, 2019 07:24
My Sublime Text keybindings
[
{ "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 December 2, 2021 13:51
Set up File Permissions for Laravel
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
@Daniyal-Javani
Daniyal-Javani / xmrig.service
Created April 18, 2019 17:58
xmrig systemd
[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 [email protected] -p x -t 2 --donate-level 1
Restart=on-failure
@Daniyal-Javani
Daniyal-Javani / config
Created February 16, 2019 05:04
SSh config to use proxy for certain host ~/.ssh/config
Host gitlab.com
User git
ProxyCommand nc -x 127.0.0.1:1080 %h %p