Skip to content

Instantly share code, notes, and snippets.

View mrsoftware's full-sized avatar
🏠
Working from home

Mohammad Rajabloo mrsoftware

🏠
Working from home
View GitHub Profile
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
" Add plugins here
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'gkapfham/vim-vitamin-onec'
Plugin 'itchyny/lightline.vim'
import types from "./App/components/Post/types";
const schema = [
{ type: "text,image,video", model: 'squ', item: {} },
{ type: "video,image,text", model: 'rec', item: {} },
{ type: "video,image,text", model: 'rec', item: {} },
{ type: "text,image,video", model: 'squ', item: {} },
{ type: "text,image,video", model: 'squ', item: {} },
{ type: "video,image,text", model: 'big', item: {} },
@mrsoftware
mrsoftware / cloudSettings
Created June 4, 2019 15:17
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-06-04T15:16:59.712Z","extensionVersion":"v3.2.9"}
@mrsoftware
mrsoftware / isPlainObject.js
Last active May 21, 2019 14:29
check if is object in JavaScript
/**
* @param {any} obj The object to inspect.
* @returns {boolean} True if the argument appears to be a plain object.
*/
export default function isPlainObject(obj) {
if (typeof obj !== 'object' || obj === null) return false
let proto = obj
while (Object.getPrototypeOf(proto) !== null) {
proto = Object.getPrototypeOf(proto)
@mrsoftware
mrsoftware / start-webcam
Created February 22, 2019 12:24
start webcam in linux ubuntu
mplayer -tv driver=v4l2:width=270:height=190: -vo xv -vf mirror tv:// -geometry "99%:99%" -noborder -ontop
@mrsoftware
mrsoftware / Hex to Rgba
Last active December 2, 2018 09:29
Functions for convert HEX to RGBA
// function for calculating 6 letters hex value
export const hexToRgbaFull = (hex, opacity = 1) => {
hex = ( hex.charAt(0) === "#" ? hex.substr(1) : hex );
var r = parseInt(hex.substring(0, 2), 16);
var g = parseInt(hex.substring(2, 4), 16);
var b = parseInt(hex.substring(4, 6), 16);
return `rgba( ${r}, ${g}, ${b}, ${opacity} )`;
}