Skip to content

Instantly share code, notes, and snippets.

View Rovel's full-sized avatar
🙈
Monkey patching life

Filipe Veloso Rovel

🙈
Monkey patching life
View GitHub Profile
@richkuz
richkuz / github-projectv2-projectnext-notes.md
Created August 7, 2022 13:56
Notes about using the new GitHub ProjectV2 API

Notes on GitHub ProjectV2 API

GitHub Projects Beta aka GitHub Projects Next aka GitHub ProjectNext is now known as GitHub ProjectV2 in the API.

It's not immediately obvious how to use the new API, especially if you're coming from the old beta API.

You no longer need to set the HTTP header: GraphQL-Features: projects_next_graphql.

You still need to add your GitHub personal access token to the Authorization header, e.g. Authorization: Basic ghp_...

@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@skozz
skozz / TZInfo
Created February 22, 2019 14:28
[Solution Rails + Docker] TZInfo::DataSourceNotFound: tzinfo-data is not present. Please add gem 'tzinfo-data' to your Gemfile and run bundle install
- Add `gem 'tzinfo-data'` to the Gemfile.
- Add `tzdata` to the Dockerfile
```
RUN apk update \
&& apk add build-base \
tzdata
```
- Build `docker-compose build` or `docker-compose up --build`
- Enjoy the life
@arikfr
arikfr / README.md
Last active April 26, 2024 10:07
Setting up HTTPS with LetsEncrypt for Redash Docker Deployment
  1. Make sure the domain you picked points at the IP of your Redash server.
  2. Switch to the root user (sudo su).
  3. Create a folder named nginx in /opt/redash.
  4. Create in the nginx folder two additional folders: certs and certs-data.
  5. Create the file /opt/redash/nginx/nginx.conf and place the following in it: (replace example.redashapp.com with your domain name)
    upstream redash {
        server redash:5000;
    }
    
@skylock
skylock / ReadMe.md
Last active September 11, 2023 13:51 — forked from devinrhode2/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

To check the current limits on your Mac OS X system, run in terminal:

launchctl limit maxfiles
ulimit -a

Steps

@nikallass
nikallass / Kali 2017.1 x64, Docker-ce Install script
Last active January 3, 2024 11:12
Kali 2017.1 x64, Docker-ce Install script
#!/bin/bash
# update apt-get
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get update
# remove previously installed Docker
sudo apt-get remove docker docker-engine docker.io* lxc-docker*
# install dependencies 4 cert
@asciant
asciant / angular.md
Last active October 30, 2015 20:11
Angular Rails 4.2

Rails 4.2 environment with AngularJS and Foundation 5

New rails project
rails new my_app -T -d postgresql
Update the Gemfile

Add:

@ngsmrk
ngsmrk / sidekiq_monitoring
Created August 11, 2014 11:51
Sidekiq queue checking via rails console
stats = Sidekiq::Stats.new
stats.queues
stats.enqueued
stats.processed
stats.failed
@Kartones
Kartones / postgres-cheatsheet.md
Last active May 3, 2024 20:51
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@justinweiss
justinweiss / filterable.rb
Last active January 11, 2024 07:28
Filterable
# Call scopes directly from your URL params:
#
# @products = Product.filter(params.slice(:status, :location, :starts_with))
module Filterable
extend ActiveSupport::Concern
module ClassMethods
# Call the class methods with names based on the keys in <tt>filtering_params</tt>
# with their associated values. For example, "{ status: 'delayed' }" would call