Skip to content

Instantly share code, notes, and snippets.

View mkhoeini's full-sized avatar

Mohammad Sadegh Khoeini mkhoeini

View GitHub Profile
@mkhoeini
mkhoeini / farsi-type.js
Last active April 27, 2023 16:16 — forked from behrad/FarsiType
FarsiType Javascript Plugin
/*
FarsiType
Version: 1.3.6
http://www.farsitype.ir
This script developed to ease typing Farsi (Persian) in web forms where there is no Farsi Keyboard installed on a PC.
Works with Internet Explorer, FireFox, Opera and Chrome.
For more information and getting the using manual please visit the script website (http://www.farsitype.ir).
Copyright 2002-2011 Kaveh Ahmadi (http://www.kavehahmadi.com, email: me@kavehahmadi.com).
@mkhoeini
mkhoeini / autoload_myspacevim.vim
Last active August 3, 2022 12:57
SpaceVim Config
function! myspacevim#before() abort
" let g:neomake_enabled_c_makers = ['clang']
" nnoremap jk <Esc>
endfunction
function! myspacevim#after() abort
" let g:ale_fixers = {
" \ 'javascript': [
" \ 'eslint',
" \ 'prettier',
@mkhoeini
mkhoeini / component.es6.js
Created September 19, 2015 16:19
Samples of a simple counter in react, with multiple approaches
// Using es6 syntax and babel transformer
import React from 'react';
export class Component extends React.Component {
constructor(props) {
super(props);
this.state = {counter: 0};
}
@mkhoeini
mkhoeini / hires.sh
Created March 31, 2020 17:25
Make KDE apps hires in macos
sudo /usr/libexec/PlistBuddy -c 'Add :NSHighResolutionCapable string "True"' ~/Applications/KDE/dolphin.app/Contents/Info.plist
sudo /usr/libexec/PlistBuddy -c 'Add :NSPrincipalClass string "NSApplication"' ~/Applications/KDE/dolphin.app/Contents/Info.plist
zplug "zsh-users/zsh-autosuggestions"
zplug "bhilburn/powerlevel9k", use:powerlevel9k.zsh-theme
zplug "zsh-users/zaw", use:zaw/zaw.zsh
zplug "plugins/gitfast", from:oh-my-zsh
zplug "plugins/httpie", from:oh-my-zsh
zplug "plugins/lol", from:oh-my-zsh
zplug "plugins/git-extras", from:oh-my-zsh
zplug "plugins/osx", from:oh-my-zsh
zplug "plugins/gitignore", from:oh-my-zsh
zplug "plugins/github", from:oh-my-zsh
@mkhoeini
mkhoeini / tmux.conf
Last active May 29, 2019 12:07
Tmux Config
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'tmux-plugins/tmux-copycat'
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will

Keybase proof

I hereby claim:

  • I am mkhoeini on github.
  • I am msk (https://keybase.io/msk) on keybase.
  • I have a public key ASDY6KSml8-YdDDyDoiyLYsji9Qm0BOxXjDLszqt6ngipQo

To claim this, I am signing this object:

@mkhoeini
mkhoeini / tween.cljs
Created November 29, 2015 04:55
Neet idea about tweening using reagent/reaction
; eurleif
;to Reagent-Project
;Nov 28
;I'm a newbie to Reagent, and I've just been playing around with it. I found a hack/pattern that seems pretty powerful. I'm curious if this is known/documented anywhere, and if there are problems with it that I haven't found. Any thoughts are appreciated.
;It starts with a "clock" reaction, which produces the current millisecond time:
(defonce clock
(let [callback-added? (reagent.ratom/atom false)
callback #(reset! callback-added? false)]
// RPN calculator
import std.algorithm, std.container.array,
std.conv, std.stdio, std.meta;
void main()
{
Array!int stack;
void binop(string op)()
{