Skip to content

Instantly share code, notes, and snippets.

View obahareth's full-sized avatar
🧉
In the Zone

Omar Bahareth obahareth

🧉
In the Zone
View GitHub Profile
{
# The first 2 films, after a given cursor value
allFilms(first: 2, after: "YXJyYXljb25uZWN0aW9uOjA=") {
# An edge is an entry in a "list"
edges {
# Get a cursor value for each "edge"
# Used for pagination, in combination with filters like
# before and after.
@obahareth
obahareth / dark.md
Created December 25, 2018 10:55 — forked from a7madgamal/dark.md
Dark mode for Slack on MacOS
  1. Close slack
  2. Open this file /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js
  3. Append this to it
document.addEventListener('DOMContentLoaded', function() {
 $.ajax({
   url: 'https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css',
   success: function(css) {
 $("").appendTo('head').html(css);
@obahareth
obahareth / mac-keyboard-shortcuts-for-windows.ahk
Created May 11, 2019 15:03
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.
;-----------------------------------------
; Make Windows keyboard behave like Mac
;=========================================
; --------------------------------------------------------------
; NOTES
; --------------------------------------------------------------
; ! = ALT
; ^ = CTRL
; + = SHIFT
@obahareth
obahareth / config.yml
Created May 13, 2019 18:38
My Fusuma config
swipe:
2:
left:
command: 'xdotool key alt+Left'
right:
command: 'xdotool key alt+Right'
3:
left:
command: 'xdotool key alt+Left'
right:
@obahareth
obahareth / nord.css
Created November 12, 2019 17:50
Nord highlight.js CSS theme
/*
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
title Nord highlight.js +
project nord-highlightjs +
version 0.1.0 +
repository https://github.com/arcticicestudio/nord-highlightjs +
author Arctic Ice Studio +
email development@arcticicestudio.com +
copyright Copyright (C) 2017 +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@obahareth
obahareth / markdown-here.css
Created November 12, 2019 17:51
Markdown Here Primary CSS Styling (I only changed it to use the PragmataPro Font)
/*
* NOTE:
* - 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
obahareth / night.css
Last active November 12, 2019 17:53
Typora Night Theme with Pragmata Pro and Pragmata Pro Mono
@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;
--select-text-bg-color:#4a89dc;
@obahareth
obahareth / install_notion_rtl.go
Created January 7, 2020 19:39
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.
package main
import (
"errors"
"fmt"
"io/ioutil"
"os"
"os/user"
"path/filepath"
"runtime"
@obahareth
obahareth / Gemfile
Created July 5, 2020 10:58 — forked from dhh/Gemfile
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
@obahareth
obahareth / Playing with NLTK and Stanford NER.md
Last active October 23, 2020 11:04
Playing around with NER using Stanford's NER and NLTK

Description

I'm playing around with NER (Named Entity Recognition) and the basic idea is that I can pass in multiple paragraphs and get recognized entities in a nicely formatted dictionary of lists.

I might look into running the Java servelet that stanford made to increase performance.

Example Output

{
  'organizations': ['Wall', 'Street', 'Journal', 'Apple', 'Inc.', 'Apple', 'TV', 'Apple', 'Mac', 'App', 'Store', 'Apple', 'Computer', ',', 'Inc.', 'Apple', 'Inc.', 'National', 'Hockey', 'League', 'Montreal', 'Canadiens', 'Stanley', 'Cups', 'Toronto', 'Blue', 'Jays'],
 'locations': ['France', 'Cupertino', 'California'],