Skip to content

Instantly share code, notes, and snippets.

View gordonturibamwe's full-sized avatar
🏠
Working from home

Gordon Turibamwe gordonturibamwe

🏠
Working from home
View GitHub Profile
<section class="relative isolate @container">
<main class="bg-[#080808] overflow-hidden h-1/2 @min-lg:space-x-5 w-full relative isolate flex @min-xl:flex-row @min-xs:flex-col justify-center items-center">
<div class="relative w-full h-full flex flex-col @min-xs:pb-10 @min-lg:pb-0 @min-xs:justify-center @min-lg:justify-center items-center">
<span class="bg-cover bg-center absolute w-full h-full top-0 left-0" style="background-image: url(https://images.unsplash.com/photo-1695883701435-7bd88f796e05?q=80&amp;w=1932&amp;auto=format&amp;fit=crop&amp;ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D)"></span>
<div class=" bg-black/70 mix-blend-multiply z-0 w-full h-full block absolute left-0 top-0"></div>
<span class="gap-[10px] text-white w-full relative space-y-5 max-w-[650px] px-[15px] flex flex-col justify-center items-center">
<span class="text-center"><h6>Rent Now, Pay Later</h6></span>
<p class="hidden font-medium text-center">Discover hassle
@gordonturibamwe
gordonturibamwe / FontAwesome-v5.0.9-Free.json
Created August 18, 2024 04:26 — forked from sakalauskas/FontAwesome-v5.0.9-Free.json
List of all Font Awesome 5 icons in JSON Cheetsheet
{
"fas fa-address-book","fas fa-address-card","fas fa-adjust","fas fa-align-center","fas fa-align-justify","fas fa-align-left","fas fa-align-right","fas fa-allergies","fas fa-ambulance","fas fa-american-sign-language-interpreting","fas fa-anchor","fas fa-angle-double-down","fas fa-angle-double-left","fas fa-angle-double-right","fas fa-angle-double-up","fas fa-angle-down","fas fa-angle-left","fas fa-angle-right","fas fa-angle-up","fas fa-archive","fas fa-arrow-alt-circle-down","fas fa-arrow-alt-circle-left","fas fa-arrow-alt-circle-right","fas fa-arrow-alt-circle-up","fas fa-arrow-circle-down","fas fa-arrow-circle-left","fas fa-arrow-circle-right","fas fa-arrow-circle-up","fas fa-arrow-down","fas fa-arrow-left","fas fa-arrow-right","fas fa-arrow-up","fas fa-arrows-alt","fas fa-arrows-alt-h","fas fa-arrows-alt-v","fas fa-assistive-listening-systems","fas fa-asterisk","fas fa-at","fas fa-audio-description","fas fa-backward","fas fa-balance-scale","fas fa-ban","fas fa-band-aid","fas fa-barcode","fas fa-bars",
@gordonturibamwe
gordonturibamwe / README.md
Created April 24, 2024 15:23 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

// AdminDashboardPage ~> pages/admin/AdminDashboard.page.jsx
// - HeaderComponent data={headerData}
// - AttentionsComponent data={attentions}
// - MetricsComponent data={metrics}
// - StakesComponent data={stakes}
// UserDashboardPage ~> pages/user/UserDashboard.page.jsx
<Head>
<title>{props?.title}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="true"/>
<meta property="og:url" content={props?.url}/>
<meta name="description" content={props?.description}/>
<meta name="msvalidate.01" content="B0FCFE92245A1381F033449833D0CA95" />
<meta property="og:type" content="website"/>
<meta name='language' content={props?.lang}/>
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
@gordonturibamwe
gordonturibamwe / vcard.html
Created September 29, 2022 04:45 — forked from dun4n/vcard.html
#JavaScript vcard generator example
<!doctype html>
<html>
<head>
<script type="text/javascript" src="vcard2.js"></script>
</head>
<body>
<script type="text/javascript">
// With helper methods
var fooBar = vCard.create(vCard.Version.FOUR)
fooBar.addFormattedname("Mr Foo Bar")
@gordonturibamwe
gordonturibamwe / subdomain-ruby.rb
Created August 1, 2022 18:19
Sub-domain in ruby
# name_controller.rb
def custom_domain
puts "++++ #{request.inspect} // #{request.referrer} + #{request.subdomains}"
respond_to do |format|
format.json {
render status: :ok,
json: success_response_messages({error: ["Subdomain working."]})
}
end
end
@gordonturibamwe
gordonturibamwe / README.md
Created June 17, 2022 22:13 — forked from jesster2k10/README.md
JWT Auth + Refresh Tokens in Rails

JWT Auth + Refresh Tokens in Rails

This is just some code I recently used in my development application in order to add token-based authentication for my api-only rails app. The api-client was to be consumed by a mobile application, so I needed an authentication solution that would keep the user logged in indefinetly and the only way to do this was either using refresh tokens or sliding sessions.

I also needed a way to both blacklist and whitelist tokens based on a unique identifier (jti)

Before trying it out DIY, I considered using:

def bubble_sort(array)
return [] if array.class != Array || array.empty?
array.each_with_index do |item, index| # loop through the array
return array if array[index + 1].nil? # return array if the next item is nil
if item > array[index + 1] # if current item is greater than next item
array[index] = array[index + 1] # replace current item with next item
array[index + 1] = item # replace next item with current item
return bubble_sort(array) # call the bubble_sort with new array ~ Recursion
end
end