Skip to content

Instantly share code, notes, and snippets.

View mort3za's full-sized avatar
🕸️

Morteza Ziyaeimehr mort3za

🕸️
View GitHub Profile
{"lastUpload":"2021-08-11T08:01:24.621Z","extensionVersion":"v3.4.3"}
@mort3za
mort3za / jquery-global.md
Last active December 14, 2020 07:14
Add jQuery to window object in Webpack 4
import jQuery from 'jquery'
window.jQuery = window.$ = window.jquery = jQuery
module: {
    rules: [
      {
 test: require.resolve('jquery'),
@mort3za
mort3za / .vimrc
Last active June 23, 2019 19:38
Just another vim config file. For frontend development (@b:m3vimrc)
set nocompatible
set encoding=utf-8
set nowrap
set number
set hlsearch
syntax enable
colorscheme tender
" if tender not found error: https://github.com/altercation/vim-colors-solarized/issues/104#issuecomment-47319082
filetype off
@mort3za
mort3za / lighthouse.js
Created May 29, 2019 15:12
Run lighthouse programmatically for multiple pages
// yarn add --dev lighthouse cross-env
// in package.json:
// scripts: { "lighthouse-dev": "cross-env NODE_ENV=development node ./lighthouse.js",
// "lighthouse-prod": "cross-env NODE_ENV=production CHROME_FLAGS=--headless node ./lighthouse.js" }
const lighthouse = require('lighthouse')
const chromeLauncher = require('chrome-launcher')
const fs = require('fs')
const mode = process.env.NODE_ENV
const chromeFlags = '-headless'
@mort3za
mort3za / owlcarousel2-a11ylayer.js
Created May 23, 2019 07:47
Owl Carousel v2 Accessibility Plugin
// forked from https://github.com/rtrvrtg/owlcarousel2-a11ylayer/blob/master/owlcarousel2-a11ylayer.js
// + some modifications
/**
* Owl Carousel v2 Accessibility Plugin
* Version 0.2.1
* © Geoffrey Roberts 2016
*/
;(function($, window, document){
@mort3za
mort3za / ie9-windows-7-x64.txt
Created April 28, 2019 11:03
Download IE9 for Windows 7 x64
https://bit.ly/1zY9F9C
( http://download.microsoft.com/download/C/1/6/C167B427-722E-4665-9A40-A37BC5222B0A/IE9-Windows7-x64-enu.exe )
@mort3za
mort3za / browsersync-webpack.md
Created December 17, 2018 13:25 — forked from robinrendle/browsersync-webpack.md
Getting set up with Browsersync and Webpack

Fixing our local environment with Browsersync

Whenever we change our templates we still have to use our build script and this can get annoying. Thankfully with webpack-dev-server and BrowserSync we can fix this:

npm i -D browser-sync browser-sync-webpack-plugin webpack-dev-server

BrowserSync will act like a proxy, waiting for webpack to do its thing and then reloading the browser for us.

@mort3za
mort3za / cloudSettings
Last active April 20, 2020 08:53
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-08-07T06:58:52.915Z","extensionVersion":"v3.4.1"}
@mort3za
mort3za / ubuntu-after-install-todo.md
Last active February 11, 2020 13:20
Things to do after install ubuntu

1. reduce delay time of repeat keys (in universal settings)

2. enable community sources in update settings

4. instlal apps

indicator-multiload, terminator, golden dict (and set hot-key), nemo (Files manager), vscode, git, chromium, keepassxc, smplayer, telegram, dropbox, filezilla, uget, gnome Tweaks., kazam

5. add keyboard layout(s) (search Region in all apps) and set shortcut left-alt left-shift for swtich langs in tweaks -> additional layout options

6. install tor and bridges

sudo apt install tor obfs4proxy send an email to bridges@torproject.org with body: get transport obfs4 and copy the reply to /etc/tor/torrc

UseBridges 1
@mort3za
mort3za / dual-boot.txt
Created September 13, 2018 13:27
Install windows 7+ after ubuntu 15+
https://askubuntu.com/a/158319/205156