Skip to content

Instantly share code, notes, and snippets.

@marckohlbrugge
marckohlbrugge / unread_only.js
Created May 3, 2018 11:42
Hides all read chats so you only see unread chats. Save this as a bookmarklet with https://mrcoles.com/bookmarklet/ and run on https://web.telegram.org/#/im
$(".im_dialog_wrap .im_dialog_badge.ng-hide").each(function(index, el){$(el).parents("li.im_dialog_wrap").addClass("ng-hide");});
@marckohlbrugge
marckohlbrugge / wip_graphql_demo.rb
Last active October 10, 2022 11:46
Ruby example of creating a todo and then completing it using wip.co graphql.
# NOTE: Be sure to set the API key further down in the code!
require "net/http"
require "uri"
require "json"
class WIP
def initialize(api_key:)
@api_key = api_key
end
text = %{This validates there's a lot of attention and real business to be made targeting the nomad and remote work space. Even if nomads have previously had an image of low-income. There's money here.}
def garble(input, intro: 0)
length = input.length
output = []
for position in 0...length
percentage = (position / length.to_f)
output << if percentage < intro ||
percentage < rand ||
@marckohlbrugge
marckohlbrugge / wipchat.coffee
Last active September 26, 2020 01:36
ubersicht widget that pulls in next wipchat todo to work on
# This is a simple example Widget, written in CoffeeScript, to get you started
# with Übersicht. For the full documentation please visit:
#
# https://github.com/felixhageloh/uebersicht
#
# You can modify this widget as you see fit, or simply delete this file to
# remove it.
# this is the shell command that gets executed every time this widget refreshes
command: "whoami"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1">
<dict>
<key>Label</key>
<string>com.marckohlbrugge.batchImportDvds</string>
<key>ProgramArguments</key>
<array>
<string>/Users/marc/Desktop/dvdcopy.sh</string>
</array>
#/bin/bash
# README:
# - Make sure to make the script executable using chmod
# - chmod +x file_name.sh
# (chmod stands for change mode)
# (x stands for executable)
# This script builds upon the work of 'mrzarquon' found here:
# http://ask.metafilter.com/142872/Help-me-archive-a-roomful-of-old-Mac-data
@marckohlbrugge
marckohlbrugge / stripe-checkout.html
Last active April 20, 2017 19:19 — forked from ziadoz/stripe-checkout.html
Custom Stripe Checkout Button
<style>
input[type="submit"] {
background-color: red;
color: white;
border-radius: 5px;
border: none;
font-size: 28px;
padding: 20px;
}
</style>
@marckohlbrugge
marckohlbrugge / gems.md
Last active December 20, 2015 18:11
Gems we use for BetaList commenting system

We recently implemented a commenting system on BetaList. It's still under heavy development, but here's an overview of the gems we're using so far:

  • acts_as_commentable_with_threading provides most of functionality you need
  • acts_as_votable makes the comments votable (so the best ones can rise to the top)
  • mention_system handles @mentions. this is a very young gem, but seems to work fine
  • mailboxer is a very robust notification system (we notify the startup when there's a comment, when someone replies to your comment, and when you are @mentioned)
@marckohlbrugge
marckohlbrugge / readme.md
Last active December 7, 2015 21:22
Changelog.co Technical Documentation

Setting up a custom domain

To set up a custom domain for your changelog ( like changelog.example.com ) follow these steps:

  1. Create a CNAME record to proxy.changelog.co (the person on your team in charge of webhosting will know how to do this)
  2. Email hey@marckohlbrugge.com with the custom domain you'd like to use.
  3. We'll let you know when the custom domain is ready.

Embedding the widget on your site

@marckohlbrugge
marckohlbrugge / example.md
Last active August 29, 2015 14:18
Such Boris

Add this just before your </body> tag:

<script src="https://cdn.rawgit.com/marckohlbrugge/a265a0532a9d95aa7329/raw/050704125399e0ae4d257e3ac0d21b19dc0bba63/suchboris.js"></script>