Skip to content

Instantly share code, notes, and snippets.

View frizbee's full-sized avatar
🎯
Focusing

Andre frizbee

🎯
Focusing
View GitHub Profile
@frizbee
frizbee / setup_new_mac_env.md
Last active September 10, 2019 06:50
Setup new Mac dev environment Mojave

Setup new Mac dev env

Homebrew

Setup brew:

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

@frizbee
frizbee / lock_screen_mac.md
Last active September 11, 2019 04:53
easy lock screen one line command for your mac

Add following line into your .zshrc or .bash_profile

alias lock='/System/Library/CoreServices/Menu\ Extras/user.menu/Contents/Resources/CGSession -suspend'

type lock in your terminal to lock screen

@frizbee
frizbee / elastic_common_used.md
Created September 23, 2019 06:16
Some of the calls to elastic search

GET

Simple

curl -X GET "localhost:9200/twitter"

More complicated

curl -X GET "localhost:9200/_search" -H 'Content-Type: application/json' -d'
{
@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"

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
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
@frizbee
frizbee / centos7.setup.sh
Last active July 9, 2020 07:14
setup dev env for centos7
#!/bin/bash
# Default settings
start=`date +%s`
bold=$(tput bold)
normal=$(tput sgr0)
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
VIMREPO="https://gist.githubusercontent.com/frizbee/8174f50d6863666efb217615bc1ecfac/raw/42db6ec0527de01e1215ca29689ea7ef10b7d51d/vimrc"
@frizbee
frizbee / ubuntu-20.04.sh
Created July 21, 2020 12:45
Ubuntu Desktop 20.04
#!/bin/bash
# This config file is for desktop version of Ubuntu
# Default settings
start=`date +%s`
bold=$(tput bold)
normal=$(tput sgr0)
red=`tput setaf 1`
green=`tput setaf 2`
@frizbee
frizbee / vimrc
Last active July 24, 2020 03:11
my current .vimrc
syntax on
set hidden
set noerrorbells
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set nu
set nowrap
@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