Skip to content

Instantly share code, notes, and snippets.

@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@J2TEAM
J2TEAM / sublime-text-scopes.md
Last active January 17, 2024 22:44 — forked from iambibhas/scopes.txt
Sublime Text 2/3: Snippet scopes

Here is a list of scopes to use in Sublime Text 2/3 snippets -

ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
@Jlevyd15
Jlevyd15 / Heroku SSL with Certbot.md
Last active January 31, 2025 07:23
Creating a SSL certificate locally using Certbot on Mac OS and deploying to an existing Heroku App

Creating a SSL certificate locally using Certbot on Mac OS and deploying to an existing Heroku App

Caveats

  • You must have a heroku app deployed on the hobby tier. This is NOT the free tier and costs ~7/month
  • i'm assuming you have homebrew installed. It will be need to install the Certbot client
  • i'm also assuming you have the heroku CLI tools installed

first up, run this to install the certbot client

brew install certbot
@timwco
timwco / delete.md
Last active February 5, 2025 16:55
LinkedIn: Delete Messages (June 2022)

What

LinkedIn is a valuable resource, but sometimes it sucks. One of those times is when you want to delete messages. You have to select each message one by one. It takes about 4 "clicks" to successfully delete a message.

This script should help. Since LI requires you to perform multiple steps, I decided to automate it for you. Once you initiate the script, it will run every second. If a message has the ability to be deleted, it will be. If not, it will be archived. Some "InMail" messages cannot be deleted on the web app. This script should work as long as LI doesn't change their page layout or element names, which happens often.

Last tested & verified working on: June, 10, 2022

Special Thanks to @noncent for the updated script.