Skip to content

Instantly share code, notes, and snippets.

View tsrandrei's full-sized avatar
πŸ’œ
Alchemy Crafting

Andrei tsrandrei

πŸ’œ
Alchemy Crafting
View GitHub Profile
@tsrandrei
tsrandrei / .zshrc
Created August 2, 2019 11:53 — forked from halidaltuner/.zshrc
my oh-my-zshrc profile
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="random"
setopt AUTO_CD # cd if no matching command
setopt AUTO_PARAM_SLASH # adds slash at end of tabbed dirs
setopt CHECK_JOBS # check bg jobs on exit
setopt EXTENDED_GLOB # globs #, ~ and ^
setopt EXTENDED_HISTORY # saves timestamps on history
setopt GLOB_DOTS # find dotfiles easier
setopt HASH_CMDS # save cmd location to skip PATH lookup
setopt HIST_EXPIRE_DUPS_FIRST # expire duped history first
@tsrandrei
tsrandrei / 00.howto_install_phantomjs.md
Last active July 9, 2019 21:55 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@tsrandrei
tsrandrei / capybara cheat sheet
Created June 14, 2019 15:09 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@tsrandrei
tsrandrei / postgres-brew.md
Last active May 14, 2019 08:39 — 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
@tsrandrei
tsrandrei / rspec_helper_example.md
Created March 7, 2019 17:43 — forked from HeroicEric/rspec_helper_example.md
An example of how to create a RSpec test helper

RSpec Helper Example

Here's an example of a rspec test helper that will let you sign in as a given user.

Create spec/support/helpers/authentication.rb with the following:

module Helpers
  module Authentication
    def sign_in_as(user)
@tsrandrei
tsrandrei / web-fonts-asset-pipeline.md
Created February 28, 2019 13:46 — forked from anotheruiguy/web-fonts-asset-pipeline.md
Custom Web Fonts and the Rails Asset Pipeline

Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.

Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.

As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.

The recommended way

Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.

@tsrandrei
tsrandrei / gist:6eae60d60eaaef092aadfc0514b23914
Created February 6, 2019 22:23 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@tsrandrei
tsrandrei / Ignore .DS_Store forever
Created January 30, 2019 17:32 — forked from linuslundahl/Ignore .DS_Store forever
Make git always ignore .DS_Store
$ git config --global core.excludesfile ~/.gitignore
$ echo .DS_Store >> ~/.gitignore
@tsrandrei
tsrandrei / happy_git_on_osx.md
Created January 30, 2019 17:23 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "[email protected]"

Okay, I see. Color schemes itself are just overwrite ANSI-color values in Terminal.app, but you have to enable color formatting in command line utilities to see any formatted output.
Here some options:
Manually enabling color formatting for such commands like ls:
Open your .bash_profile or .bash_profile (I believe you're using bash shell, am i right?) in any text editor like nano ~/.bash_profile and paste following somewhere in the end of file:
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'