Skip to content

Instantly share code, notes, and snippets.

View frizbee's full-sized avatar
🎯
Focusing

Andre frizbee

🎯
Focusing
View GitHub Profile
@frizbee
frizbee / readme.md
Created June 26, 2021 19:47 — forked from maxivak/readme.md
sitemap.xml for Rails 4 application

Generate sitemap.xml in Rails app

This post shows how to make sitemap.xml for your web site. The sitemap will be accessible by URL http://mysite.com/sitemap.xml

Routes

Myrails::Application.routes.draw do
@frizbee
frizbee / install-ruby.sh
Last active November 12, 2022 05:51 — forked from hopsoft/install-ruby.sh
Install ruby with rbenv and jemalloc on ubuntu
sudo apt-get update
sudo apt-get install libjemalloc-dev
RUBY_CONFIGURE_OPTS='--with-jemalloc' rbenv install 2.7.1
rbenv global 2.7.1
# test (look for jemalloc warnings)
MALLOC_CONF=invalid_flag:foo ruby -v
# check
ruby -r rbconfig -e "puts RbConfig::CONFIG['MAINLIBS']"
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do

install nodejs

sudo apt-get update
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs yarn
@frizbee
frizbee / ctags.setup
Last active December 30, 2019 03:41 — forked from nazgob/ctags.setup
ctags setup on mac
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
> ctags: illegal option -- R
> usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"