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
convert() {
var numerals = {
persian : ["۰", "۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹"],
arabic : ["٠", "١", "٢", "٣", "٤", "٥", "٦", "٧", "٨", "٩"]
};
function fromEnglish(str, lang){
var i, len = str.length, result = "";
for( i = 0; i < len; i++ )
@a-m-dev
a-m-dev / git-pushing-multiple.rst
Last active February 17, 2019 06:04 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

stages:
- develop
job_develop:
stage: develop
only:
- develop
tags:
// module one
class TempClass {
justLog() {
// do what ever the heck you want...
console.log('hi there...')
}
}
Command line instructions
Git global setup
git config --global user.name "a_m_dev"
git config --global user.email "a.mirzaei.dev@gmail.com"
Create a new repository
git clone http://tpi.uneed.ir:8888/root/webApp-main.git
cd webApp-main
touch README.md
const t0 = performance.now()
...some operation
const t1 = performance.now()
console.warn(`request took: ${(t1 - t0) / 1000} s...` )
// react Part
import React from 'react'
class About extends React.Component {
constructor() {
super()
this.state = {
// MEDIA QUERIES
@mixin MIN_QUERY($min) {
@media screen and (min-width: $min){
@content;
}
}
@mixin MAX_QUERY($max) {
@media screen and (max-width: $max){
01 - install hyper
02 - open config file by going to edit > Preferences
03 - comment all code
04 - add this setting:
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
@a-m-dev
a-m-dev / Nginx setup
Last active January 1, 2020 18:28
Simple Step by Step Nginx setup
# 01 - build your web app
# 02 - build the production version of your app into dist folder
# 03 - use express to create a simple server like below
const express = require('express')
const webpack = require('webpack')
const path = require('path')
const webpackMiddleware = require('webpack-dev-middleware')