Skip to content

Instantly share code, notes, and snippets.

View a-m-dev's full-sized avatar

Ahmad Mirzaei a-m-dev

View GitHub Profile
#!/bin/bash
cvt -r 1920 1080
xrandr --newmode "1920x1080R" 138.50 1920 1968 2000 2080 1080 1083 1088 1111 +hsync -vsync
xrandr --addmode VGA-0 1920x1080R
#!/bin/bash
cvt -r 1920 1080
xrandr --newmode "1920x1080R" 138.50 1920 1968 2000 2080 1080 1083 1088 1111 +hsync -vsync
xrandr --addmode VGA-0 1920x1080R
{
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:react/recommended"
],
"plugins": [
"react"
],
@a-m-dev
a-m-dev / pre-commit
Last active February 3, 2020 08:26
git pre commit
#!/bin/bash
# colors
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
LIGHT_RED='\033[1;31m'
LIGHT_GREEN='\033[1;32m'
@a-m-dev
a-m-dev / Docker
Last active November 12, 2019 06:37
docker build -t test_04 -f Dockerfile-CSR .
docker build --network host .
docker run -p 9000:80 --rm test_04
// -d for detached mode ( run in background )
docker run -d -p 9000:80 --rm test_04
{
test: /\.(sa|sc|c)ss$/,
use: [
MiniCssExtractPlugin.loader,
// 'css-loader',
{
loader: 'css-loader',
options: {
importLoaders: 1,
localsConvention: 'camelCaseOnly',
import requests
from bs4 import BeautifulSoup
response = requests.get('https://www.varzesh3.com').content
# 01 create table
php artisan make:migration create_articles_table --create=articles
# 02 create fake data with seeder
php artisan make:seeder ArticlesTableSeeder
showResult = (result) => {
let node = document.createElement('DIV');
node.classList.add('custom-alert');
let textnode = document.createTextNode(result);
node.appendChild(textnode);
node.style.overflow = 'scroll';
node.style.position = 'fixed';
node.style.height = '5%';
node.style.width = '100%';
node.style.zIndex = '1000011111111';
# 01 php -v
if you saw the php version you can skip this step else you need to install it. for installing php you need to run `sudo apt install php`. and after that you need to run `sudo apt install hhvm`. this would take cuple minutes. to varify that you can type this command to check the version of that `php --version`
# 02 installing composer
for installing composer you need to run run this command `sudo apt install composer`. to varify that you can type this command to check the version of that `composer --version`
# 03 navigating to folder directory
type this command to go inside the htdocs directory: `cd /opt/lampp` inside that directory you have `htdocs` folder. navigate inside of that with this command `cd ./htdocs`
and then create a folder with this command: `mkdir tmp`. the `tmp` is the folder name. just after creating the folder you need to navigate inside that folder with this command: `cd tmp`