Skip to content

Instantly share code, notes, and snippets.

Excited about the next phase in life

Omar Bahareth obahareth

Excited about the next phase in life
View GitHub Profile
View redis_hash_store.rb
module RedisHashStore
extend self
class Entry
attr_reader :value
def initialize(value, expires_in:)
@value = value
@created_at =
@expires_in = expires_in
obahareth / Gemfile
Created Jul 5, 2020 — forked from dhh/Gemfile
HEY's Gemfile
View 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
obahareth / install_notion_rtl.go
Created Jan 7, 2020
A Go script to install Notion RTL (on macOS only for now) for the desktop app. Sadly Notion recreates the HTML file this script modifies on whenever the app is relaunched, so the changes need to keep being reapplied.
View install_notion_rtl.go
package main
import (
View hyperpayPayments.js
const saveCardToHyperPay = data => {
var path = "/v1/registrations";
let cardBrand = Payment.fns.cardType(data.number);
if (cardBrand == "visa" || cardBrand == "master" || cardBrand == "mada") {
var cardData = querystring.stringify({
"authentication.userId": config.HYPERPAY.UserId,
"authentication.password": config.HYPERPAY.Password,
"authentication.entityId": config.HYPERPAY.EntityId,
paymentBrand: cardBrand.toUpperCase(),
"card.number": data.number || "",
obahareth / night.css
Last active Nov 12, 2019
Typora Night Theme with Pragmata Pro and Pragmata Pro Mono
View night.css
@import "night/mermaid.dark.css";
@import "night/codeblock.dark.css";
@import "night/sourcemode.dark.css";
:root {
--bg-color: #363B40;
--side-bar-bg-color: #2E3033;
--text-color: #b8bfc6;
obahareth / markdown-here.css
Created Nov 12, 2019
Markdown Here Primary CSS Styling (I only changed it to use the PragmataPro Font)
View markdown-here.css
* - The use of browser-specific styles (-moz-, -webkit-) should be avoided.
* If used, they may not render correctly for people reading the email in
* a different browser than the one from which the email was sent.
* - The use of state-dependent styles (like a:hover) don't work because they
* don't match at the time the styles are made explicit. (In email, styles
* must be explicitly applied to all elements -- stylesheets get stripped.)
obahareth / nord.css
Created Nov 12, 2019
Nord highlight.js CSS theme
View nord.css
title Nord highlight.js +
project nord-highlightjs +
version 0.1.0 +
repository +
author Arctic Ice Studio +
email +
copyright Copyright (C) 2017 +
obahareth / config.yml
Created May 13, 2019
My Fusuma config
View config.yml
command: 'xdotool key alt+Left'
command: 'xdotool key alt+Right'
command: 'xdotool key alt+Left'
obahareth / mac-keyboard-shortcuts-for-windows.ahk
Created May 11, 2019
I recently begun migrating from macOS to Windows and needed to get the same keyboard shortcuts my muscle memory is used to working on Windows. This is an amalgamation of many AutoHotkey scripts I found online.
View mac-keyboard-shortcuts-for-windows.ahk
; Make Windows keyboard behave like Mac
; --------------------------------------------------------------
; --------------------------------------------------------------
; ! = ALT
; ^ = CTRL
; + = SHIFT
obahareth /
Created Dec 25, 2018 — forked from a7madgamal/
Dark mode for Slack on MacOS
  1. Close slack
  2. Open this file /Applications/
  3. Append this to it
document.addEventListener('DOMContentLoaded', function() {
   url: '',
   success: function(css) {