Skip to content

Instantly share code, notes, and snippets.

/*
Enable dark mode on slack by appending the below code to this file:
/Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js
NOTE: you will need to change the URL to the latest version of this gist by clicking the "Raw" button.
document.addEventListener('DOMContentLoaded', function() {
$.ajax({
url: 'https://gist.githubusercontent.com/jon077/330e86682905f2c7ffa5e9a755cfe012/raw/fdcf34fcb8f92283d2c0376025b47e28ecc7195c/slack-dark-mode',
@mattpodwysocki
mattpodwysocki / eventsource.js
Last active September 23, 2019 15:34
Adding support for server-sent events for RxJS
if (!!root.EventSource) {
/**
* This method wraps an EventSource as an observable sequence.
* @param {String} url The url of the server-side script.
* @param {Observer} [openObserver] An optional observer for the 'open' event for the server side event.
* @returns {Observable} An observable sequence which represents the data from a server-side event.
*/
dom.fromEventSource = function (url, openObserver) {
return new AnonymousObservable(function (observer) {
@stephenll
stephenll / .bash_profile
Created February 2, 2014 02:45 — forked from jernejcic/.bash_profile
.bash_profile file on Mac OS X
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases.
# Much of this was originally copied from:
# http://natelandau.com/my-mac-osx-bash_profile/
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
Element.addMethods("INPUT", {
whatever: function(element) {
// make this shit work.
return element;
}
});