Skip to content

Instantly share code, notes, and snippets.

View aritode's full-sized avatar
🎼

Arian Deli aritode

🎼
View GitHub Profile
@aritode
aritode / Fix Cygwin Issue with RubyGem
Created June 8, 2016 09:34
No such file or directory — /cygdrive/c/Ruby/bin/gem (LoadError)
//We must add the following to your .bashrc (C:\cygwin\home\user\.bashrc):
alias ruby='/cygdrive/c/Ruby22-x64/bin/ruby'
alias gem='/cygdrive/c/Ruby22-x64/bin/gem.bat'
alias irb='/cygdrive/c/Ruby22-x64/bin/irb.bat'
alias compass='/cygdrive/c/Ruby22-x64/bin/compass.bat'
alias sass='/cygdrive/c/Ruby22-x64/bin/sass.bat'
alias scss='/cygdrive/c/Ruby22-x64/bin/scss.bat'
alias bundle='/cygdrive/c/Ruby22-x64/bin/bundle.bat'
@aritode
aritode / create-new-site.txt
Created December 5, 2016 22:28 — forked from bappi-d-great/create-new-site.txt
Enable SSL in local site
# create a site with vhost domain sslsite.dev
# follow the on-screen instructions and configure your new site
$ vv create
@aritode
aritode / rubocop_pre_commit_hook
Created February 21, 2017 10:26 — forked from palkan/rubocop_pre_commit_hook
Rubocop pre-commit hook
#!/usr/bin/env ruby
ADDED_OR_MODIFIED = /^\s*(A|AM|M)/.freeze
changed_files = `git status --porcelain`.split(/\n/)
unstaged_files = `git ls-files -m`.split(/\n/)
changed_files = changed_files.select { |f| f =~ ADDED_OR_MODIFIED }
changed_files = changed_files.map { |f| f.split(" ")[1] }
@aritode
aritode / markdown-editors-list.md
Created July 5, 2017 13:10
Tools to support your markdown authoring

Tools to support your markdown authoring

Markdown is automatically rendered to html GitHub but can easily be parsed into a variety of other formats including PDF and LaTex. To convert seamlessly to these formats, you'll need a document converter. Pandoc is one such open source tool that is available on all platforms. You'll need to install a local copy to be able to run all the examples in this repo.

Pandoc

Pandoc is a universal document converter. It works from the command line and you can quickly convert a document between any two formats. These include nearly all formats commonly used for scientific writing such as Word, Markdown, Latex, HTML and RTF.

Download and install pandoc

@aritode
aritode / nginx-tuning.md
Created October 12, 2017 12:29 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@aritode
aritode / 15 Questions to Ask During a Ruby Interview.md
Created October 16, 2017 08:12
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

@aritode
aritode / fix-homebrew-npm.md
Created January 29, 2018 15:06 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

@aritode
aritode / apps.md
Created February 2, 2018 19:43 — forked from rosswd/apps.md
2017 MacOS Apps

Mac Apps

This is a list of MacOS apps I like. I'm trying to just include apps that are not mainstream but still high quality. The list was complied in August 2017.

Media

@aritode
aritode / win.md
Created February 2, 2018 19:44 — forked from rosswd/win.md
Apps to make windows better

Windows programs

Shells and Terminals

  • Conemu
  • Console2
  • rxvt & cygwin
  • Powershell

Development

  • Gitbash / Git for Windows
@aritode
aritode / homebrew.md
Created May 22, 2018 08:55 — forked from indiesquidge/homebrew.md
How to and Best of Homebrew

Homebrew

How To

Homebrew is a package management system for OS X. You can read more about it here, or simply run

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

to install it.