Skip to content

Instantly share code, notes, and snippets.

View mkhuda's full-sized avatar
🎯
Focusing

Lek Huda mkhuda

🎯
Focusing
View GitHub Profile
@mkhuda
mkhuda / github-store.js
Created July 31, 2018 16:42 — forked from alexvcasillas/github-store.js
Async Fetching with MobX Actions
import fetch from 'node-fetch';
import { observable, action, runInAction } from 'mobx';
export default class GithubStore {
@observable searchName;
@observable user;
@observable repos;
@observable fetchingData;
constructor() {
@mkhuda
mkhuda / vimrc.plugins
Created July 12, 2018 18:42 — forked from micahriggan/vimrc.plugins
Vim with javascript plugins and general developing plugins
" General Developer Plugins
Plugin 'VundleVim/Vundle.vim'
" plugin manager
Plugin 'Valloric/YouCompleteMe'
" autocomplete 5/5
Plugin 'scrooloose/nerdtree'
@mkhuda
mkhuda / letsencrypt_2017.md
Last active May 20, 2018 22:08 — forked from cecilemuller/letsencrypt_2020.md
Let's Encrypt for Ruby on Rails with Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

For Ruby on Rails with Nginx (Puma or Phusion Passenger)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com.

@mkhuda
mkhuda / install-vim.sh
Last active April 8, 2021 01:36
Install Vim 8 with Python, Python 3, Ruby, Lua, Clipboard and Arabic support on Ubuntu 14.04/16.04
# remove all installed vim package
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
# install dependencies (for normal users)
sudo apt-get install gtk+-2.0 liblua5.1-dev luajit libluajit-5.1 python-dev python3-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
# install dependencies (for ruby-rbenv users)
sudo apt-get install gtk+-2.0 liblua5.1-dev luajit libluajit-5.1 python-dev python3-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
# Optional: so vim can be uninstalled again via `dpkg -r vim`
@mkhuda
mkhuda / migrating-from-mysql-to-postgres.rst
Created April 10, 2016 16:48 — forked from igniteflow/migrating-from-mysql-to-postgres.rst
Migrating from MySQL to Postgres in Ubuntu

Migrating from MySQL to Postgres in Ubuntu

Dump your database:

mysqldump --compatible=postgresql --default-character-set=utf8 -r databasename.mysql -u root databasename

Convert the dump to Postgres syntax using https://github.com/lanyrd/mysql-postgresql-converter:

wget https://raw.github.com/lanyrd/mysql-postgresql-converter/master/db_converter.py
@mkhuda
mkhuda / Gradle_Adb_Plugin.gradle
Created November 5, 2015 19:36 — forked from mohsenk/Gradle_Adb_Plugin.gradle
Gradle task for connect adb to android device over wifi network
import groovy.swing.SwingBuilder
task adbConnect(type: Exec) {
doFirst {
new SwingBuilder().edt {
dialog(modal: true,
title: 'Enter password',
alwaysOnTop: true,
resizable: false,
locationRelativeTo: null,