Skip to content

Instantly share code, notes, and snippets.

View Rio517's full-sized avatar

Mario Olivio Flores Rio517

View GitHub Profile
@Rio517
Rio517 / demo-no-add-in-combobox.patch
Created September 22, 2023 07:13
demo-no-add-in-combobox.patch
diff --git a/assets/css/app.css b/assets/css/app.css
index 1316bc4..d34f635 100644
--- a/assets/css/app.css
+++ b/assets/css/app.css
@@ -1,5 +1,6 @@
@import "tailwindcss/base";
@import "../../deps/petal_components/assets/default.css";
+@import "../../deps/petal_framework/assets/css/combo-box.css";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
@Rio517
Rio517 / test_results.log
Last active February 24, 2023 08:40
Petal Pro Test Coverage
mix test --cover
Excluding tags: [:feature, :petal_framework]
.........................................................................................................................................................................................................
Finished in 3.1 seconds (1.3s async, 1.7s sync)
7 doctests, 3 features, 195 tests, 0 failures, 4 excluded
Randomized with seed 300907
----------------
COV FILE LINES RELEVANT MISSED
@Rio517
Rio517 / install.log
Last active November 20, 2021 21:18
Linux Min 19 Install log - fails with Calling 'apt-install grub-efi-amd64-signed' failed
# posting for reference in https://forums.linuxmint.com/viewtopic.php?f=46&t=272966
Jul 11 20:33:42 mint ubiquity[1988]: Device /dev/nvme0n1p3 not found in os-prober output
Jul 11 20:33:42 mint ubiquity[1988]: Device free not found in os-prober output
Jul 11 20:33:42 mint ubiquity[1988]: Device /dev/nvme0n1p6 not found in os-prober output
Jul 11 20:33:42 mint ubiquity[1988]: Device /dev/nvme0n1p7 not found in os-prober output
Jul 11 20:33:42 mint ubiquity[1988]: Device free not found in os-prober output
Jul 11 20:33:42 mint ubiquity[1988]: Device /dev/nvme0n1p8 not found in os-prober output
Jul 11 20:33:42 mint ubiquity[1988]: Device /dev/nvme0n1p4 not found in os-prober output
Jul 11 20:33:42 mint ubiquity[1988]: Device free not found in os-prober output
@Rio517
Rio517 / request.log
Created May 22, 2018 11:50
Slack API Issue
curl -X GET \
'https://slack.com/api/files.list?token=REMOVED&page=1&types=&channel=' \
-H 'Cache-Control: no-cache' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-encoding: gzip, deflate, br' \
-H 'accept-language: en-US,en;q=0.9,de;q=0.8' \
-H 'authority: slack.com' \
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36'
@Rio517
Rio517 / request.log
Last active March 29, 2018 05:57
WOW Booking Error
POST /api/midgardur/v4/reservations HTTP/1.1
Host: booking.prod.wowair.net
Origin: https://booking.wowair.com
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,de;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
Content-Type: application/json
Accept: application/json
Referer: https://booking.wowair.com/passengers
Connection: keep-alive
@Rio517
Rio517 / action_dispatch_override.rb
Created March 5, 2018 10:04
Allow passing body to in rails test suites
# Overriding ActionDispatch::Integration::Session.any_instance.process
# Adding a body and passing to rack-test as an :input param.
module ActionDispatch
module Integration
class Session
#add body param here
def process(method, path, params: nil, body: nil, headers: nil, env: nil, xhr: false, as: nil)
request_encoder = RequestEncoder.encoder(as)
headers ||= {}
@Rio517
Rio517 / application.controller.js
Last active August 25, 2017 19:51 — forked from spieker/application.controller.js
nested JSON-API attributes ember example
import Ember from 'ember';
import Serializer from '../serializers/author';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
serialized: Ember.computed(function() {
return JSON.stringify(this.get('model').serialize(), null, 2);
})
});
@Rio517
Rio517 / humaize.rb
Created February 3, 2017 15:26
Humanize.rb - a Copy and Paste version of https://github.com/radar/humanize. So I can quickly paste into console when useful. English bits only.
module Humanize
SUB_ONE_THOUSAND = {
:en => ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen', 'twenty', 'twenty-one', 'twenty-two', 'twenty-three', 'twenty-four', 'twenty-five', 'twenty-six', 'twenty-seven', 'twenty-eight', 'twenty-nine', 'thirty', 'thirty-one', 'thirty-two', 'thirty-three', 'thirty-four', 'thirty-five', 'thirty-six', 'thirty-seven', 'thirty-eight', 'thirty-nine', 'forty', 'forty-one', 'forty-two', 'forty-three', 'forty-four', 'forty-five', 'forty-six', 'forty-seven', 'forty-eight', 'forty-nine', 'fifty', 'fifty-one', 'fifty-two', 'fifty-three', 'fifty-four', 'fifty-five', 'fifty-six', 'fifty-seven', 'fifty-eight', 'fifty-nine', 'sixty', 'sixty-one', 'sixty-two', 'sixty-three', 'sixty-four', 'sixty-five', 'sixty-six', 'sixty-seven', 'sixty-eight', 'sixty-nine', 'seventy', 'seventy-one', 'seventy-two', 'seventy-three', 'seventy-four', 'seventy-five
@Rio517
Rio517 / 1password_lastpass_migrator.rb
Last active February 1, 2017 13:45
First pseudo code of how I might do this. Obviously, this is only 5 minutes of work, so my parser class is not well thought out or might not be neccessary.
# psudeo code for how I might build a 1password => lastpass converter
# this is done becuase lastpasse's importer seems to ingore many fields.
# Usage:
# OnePasswordCsv.new(
# input_csv_path: 'exported_admin_folder_from_1password.csv',
# output_csv_path: 'lastpass_admin_import.csv'
# )
class OnePasswordCsv
@Rio517
Rio517 / json_api_mocking.rb
Last active August 23, 2016 20:13
JSON-API mocking library/script - in Ruby
# JSON-API mocking library - a very, very simple script to help mock JSON-API
# JSON. This is more designed to return scaffolding that can then be manually
# edited. It supports only single resource objects, with included or linked
# children, but only one child per relationship. This might be useful for
# specing out what your API could look like for frontend and backend developers.
# Example usage is at the bottom. If I were to take this further, I'd make it
# more recursive.
class JsonApiMock