Skip to content

Instantly share code, notes, and snippets.

View EhsanZ's full-sized avatar
🐰
Super

Ehsan Zumrut EhsanZ

🐰
Super
View GitHub Profile
@EhsanZ
EhsanZ / VortexRace3ForMac.md
Created April 7, 2022 18:29 — forked from arogulin/VortexRace3ForMac.md
How to setup Vortex Race 3 keyboard for Mac and move Fn key to Home

How to setup Vortex Race 3 for Mac with latest (on 2020-01-05) firmare V1.02.05.

For better understanding we will use the following naming convention:

  [ L1 ][ L2 ][ L3 ][ Space ][ R1 ][ R2 ][ R3 ]
  1. Reset everything by pressing L3+R1 for 5 seconds. Left LED will blink white color while you're holding the keys. Release them after it stopeed blinking.
  2. Get into one of the programmable layers (R2+RShift) – I like red, the super bright laser LED is the least super annoying in red.
  3. Put the keyboard in Windows Mode (Pn+W), it's the least problematic one.
@EhsanZ
EhsanZ / postgres-brew.md
Last active October 25, 2019 18:46 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@EhsanZ
EhsanZ / cloudSettings
Last active October 16, 2019 07:09
Visual Studio Settings
{"lastUpload":"2019-10-16T07:08:28.018Z","extensionVersion":"v3.4.3"}
@EhsanZ
EhsanZ / array_length_validator.rb
Created July 11, 2018 03:39
Rails 5 Array Length Custom Validator
class ArrayLengthValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
return unless validate_options(options, value)
array_size = value.size
minimum = options[:minimum] || array_size
maximum = options[:maximum] || array_size
error = get_error(array_size, minimum, maximum)
return if error.blank?
@EhsanZ
EhsanZ / class_component.jsx
Last active October 18, 2017 12:27
React / Redux File Templates For JetBrain IDEs
import React, {PropTypes} from 'react'
class $NAME extends React.Component {
render() {
return(<h1> $NAME </h1>)
}
}
$NAME .PropTypes = {
// myProp: PropTypes.string.isRequired