Skip to content

Instantly share code, notes, and snippets.

@weshouman
weshouman / tip 2.md
Last active October 7, 2016 10:09
command of the day tips

  1. Ensure having a clean index (nothing is staged).
  2. Stage the files of interest (assuming they are the files in src/).
git add src/
  1. Stash interactively what we want for the patch
@weshouman
weshouman / functions.md
Last active July 24, 2021 19:47
javascript functions notes #javascript
@weshouman
weshouman / examples.md
Last active October 28, 2017 06:36
bad side of javascript #javascript

Caution

This Gist is a WIP

Preface

Through getting more and more into Javascript, some stories aren't that happy, following are scenarios that show why javascript isn't the best language you'll face

Scoping

Global variable

@weshouman
weshouman / scoping.md
Last active October 22, 2016 06:10
Advanced: Ruby difference between class definitions

Imagine having a Food module within the our Zoo module.
Other classes than delicious could be defined too in the Food module.

We actually want to know how using this class is possible in other modules.

module Zoo
  module Food
    class Delicious
      # code
    end
@weshouman
weshouman / javascript tuts.md
Last active October 28, 2017 06:36
a good course way for js #javascript

This is a guideline for learning javascript.
It should pick you up from the start of learning to mastering javascript.
It is ok to jump the courses that you find less adding to the more challenging ones.
And It is incomplete yet.

Step 1

Walkthrough the language

@weshouman
weshouman / elixir notes.md
Last active October 24, 2016 20:58
a guide for moving around into an elixir project

Configurations

  • Configurations files structure and navigating them: Github guide
  • Generally:
config/
├── config.exs
├── dev.exs
├── prod.exs
└── test.exs
@weshouman
weshouman / cmd_aliases.cmd
Last active November 4, 2016 07:09
things to do upon having a new windows installation
@echo off
:: this is a file template for cmd_aliases mentioned in the main tutorial
:: originally captured from the reference SO question http://stackoverflow.com/questions/20530996/aliases-in-windows-command-prompt
:: Temporary system path at cmd startup (examples)
::set PATH=%PATH%;"C:\Program Files\Sublime Text 2\"
:: Add to path by command (examples)
@weshouman
weshouman / javascript_tips.md
Last active May 16, 2025 07:09
Javascript tips and tricks #study #javascript

Caution

This Gist is a WIP

Multiple variable assignment

var a, b, c;
a = b = c = 10;
alert(a + b + c)

source

@weshouman
weshouman / vim tips.md
Last active April 2, 2020 03:57
tips and tricks for vim beginners

Caution

This Gist is a WIP

Useful vimrc Setup

ctrl+p does autocompletion over a file.

Set the following into your .vimrc

filetype plugin indent on
" show existing tab with 4 spaces width
@weshouman
weshouman / Good regexes.md
Last active October 28, 2017 06:35
SOS regexes #study

Those regexes were tested on Sublime text editor.
Use Regex101 to validate your regexes.

Decorate line content with #ifdef something and #endif something

find what \n(\w+)\n
replace with #ifdef something\n\1\n#endif something
Sample case:


abc