Skip to content

Instantly share code, notes, and snippets.

View jacek213's full-sized avatar

Jacek Grzybowski jacek213

View GitHub Profile
@mbostock
mbostock / .block
Last active November 22, 2022 23:32
Line Transition
license: gpl-3.0
@xcodeit
xcodeit / gist:3726868
Created September 15, 2012 07:52 — forked from metaphox/gist:1755841
General principles for good URI design
General principles for good URI design:
Don't use query parameters to alter state
Don't use mixed-case paths if you can help it; lowercase is best
Don't use implementation-specific extensions in your URIs (.php, .py, .pl, etc.)
Don't fall into RPC with your URIs
Do limit your URI space as much as possible
Do keep path segments short
Do prefer either /resource or /resource/; create 301 redirects from the one you don't use
Do use query parameters for sub-selection of a resource; i.e. pagination, search queries
@tomas-stefano
tomas-stefano / Capybara.md
Last active April 25, 2024 16:44
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
@akdetrick
akdetrick / rvm-to-rbenv.md
Last active March 15, 2024 17:06
Guide to switching to rbenv bliss from RVM hell

RVM to rbenv

Why? @sstephenson explains it best here.


1) remove RVM from your system

This should get rid of the rvm dir and any installed rubies:

$ rvm implode
@tompave
tompave / nginx.conf
Last active August 15, 2022 10:18
commented nginx.conf for Ruby on Rails
# A commented nginx configuration file for Ruby on Rails
#
# Author: Tommaso Pavese
# tommaso@pavese.me
# http://tommaso.pavese.me
#
# License: http://www.wtfpl.net/
#
#
# Tested with:
@maxivak
maxivak / 00.md
Last active April 20, 2024 22:17
Sending emails with ActionMailer and Sidekiq

Sending emails with ActionMailer and Sidekiq

Send email asynchroniously using Sidekiq.

ActionMailer

Create your mailer us usual:

@daicham
daicham / .gitlab-ci.yml
Last active May 3, 2023 07:05
A sample of .gitlab-ci.yml for a gradle project
image: java:8-jdk
stages:
- build
- test
- deploy
before_script:
# - echo `pwd` # debug
# - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug
@jazzido
jazzido / graphql.rb
Last active July 3, 2021 06:36
Neo4J + GraphQL — Toy example using graphql-ruby and neo4jrb
require 'graphql'
require 'neo4j'
neo4j_url = ENV['NEO4J_URL'] || 'http://localhost:7474'
session = Neo4j::Session.open(:server_db, neo4j_url)
class Author
include Neo4j::ActiveNode
id_property :id_author
@briankung
briankung / docker-pry-rails.md
Last active December 12, 2023 10:40
Using pry-rails with Docker

First, add pry-rails to your Gemfile:
https://github.com/rweng/pry-rails

gem 'pry-rails', group: :development

Then you'll want to rebuild your Docker container to install the gems

@wbotelhos
wbotelhos / clear-sidekiq-jobs.sh
Last active April 2, 2024 10:04
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear