Skip to content

Instantly share code, notes, and snippets.

View raulsouzalima's full-sized avatar
🤘

Raul Souza Lima raulsouzalima

🤘
View GitHub Profile
@raulsouzalima
raulsouzalima / json_schema.rb
Last active December 18, 2020 13:33
JsonSchema.rb
# app/schemas/credit_card_params_schema.json
{
"id": "//credit_card_params_schema",
"type": "object",
"properties": {
"holder_name": { "type": "string" },
"number": { "type": "string" },
"brand": { "type": "string" },
"month": { "type": "string" },
"year": { "type": "string" },
@raulsouzalima
raulsouzalima / raul.cfg
Last active June 24, 2021 23:05
CS:GO config file
unbindall
bind "0" "slot10"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "6" "slot6"
bind "7" "slot7"
bind "8" "slot8"
@raulsouzalima
raulsouzalima / curl.md
Created January 20, 2020 17:47 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@raulsouzalima
raulsouzalima / README-Template.md
Created March 31, 2019 15:45 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

require "benchmark"
def print_memory_usage
memory_before = `ps -o rss= -p #{Process.pid}`.to_i
yield
memory_after = `ps -o rss= -p #{Process.pid}`.to_i
puts "Memory: #{((memory_after - memory_before) / 1024.0).round(2)} MB"
end
Ctrl-w H or type :wincmd H to go from horizontal to vertical layout.
Ctrl-w J or type :wincmd J to go from vertical to horizontal layout.
Ctrl-w r or type :wincmd r to swap the two buffers but keep the window layout the same.
Ctrl-w w or type :wincmd w to move the cursor between the two windows/buffers.
git rebase -i @~5 # Show the last 5 commits in a text editor
In the default editor, modify pick to edit in the line whose commit you want to modify.
Make your changes and then commit them with the same message you had before:
$ git commit --all --amend --no-edit #to modify the commit, and after that
$ git rebase --continue #to return back to the previous head commit.
$ bundle exec foreman start [2.3.0]
13:50:22 web.1 | started with pid 57566
13:50:23 web.1 | [57566] Puma starting in cluster mode...
13:50:23 web.1 | [57566] * Version 2.16.0 (ruby 2.3.0-p0), codename: Midwinter Nights Trance
13:50:23 web.1 | [57566] * Min threads: 5, max threads: 5
13:50:23 web.1 | [57566] * Environment: development
13:50:23 web.1 | [57566] * Process workers: 2
13:50:23 web.1 | [57566] * Preloading application
13:50:31 web.1 | [57566] ! Unable to load application: LoadError: dlopen(/Users/raulsouzalima/.rbenv/versions/2.3.0/lib/ruby/2.3.0/x86_64-darwin14/readline.bundle, 9): Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
13:50:31 web.1 | Referenced from: /Users/raulsouzalima/.rbenv/versions/2.3.0/lib/ruby/2.3.0/x86_64-darwin14/readline.bundle
@raulsouzalima
raulsouzalima / config.json
Created July 21, 2016 20:29 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@raulsouzalima
raulsouzalima / android_publisher.rb
Created February 5, 2016 17:04
Google Play receipt validation with Google API
# Versão 0.9.1
require 'google/apis/androidpublisher_v2'
receipt = JSON.parse(File.read('spec/support/receipts/android.json'))
package_name = receipt['packageName']
product_id = receipt['productId']
purchase_token = receipt['purchaseToken']