Skip to content

Instantly share code, notes, and snippets.

@timwco
timwco / delete.md
Last active July 20, 2023 15:59
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.

@Jlevyd15
Jlevyd15 / Heroku SSL with Certbot.md
Last active July 11, 2023 18:03
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
@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
@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;
@mason-stewart
mason-stewart / rollout.sh
Created August 29, 2014 17:31
Roll out.
#!/bin/bash
open -a Google\ Chrome "https://www.youtube.com/watch?v=mjqn6j2VM2U"
sleep 16
say "roll out"
sleep 0.8
say "roll out"
sleep 0.8
say "roll out"
sleep 0.8
@phpfunk
phpfunk / backup-overview.md
Last active November 28, 2016 17:59
Back That Thang Up (Backing up Your Backups)

So you are making backups? That's good news, but are your backups backed up? As a good rule of thumb I back everything up to a network drive, then that network drive backs up to another drive and is also shipped to Backblaze for an offsite copy. Backblaze doesn't support network drives so I have them hooked up to an older mac mini that I use as a server. Backblaze is only $5/month for unlimited data, so you really can't lose there.

I always mirror my backup internally for when that drive fails and evenutally it will. That way I have a copy to swap out while I get another drive. Backblaze is used for total data loss. If all drives fail or burn up, are stolen, what have you; I will still have my data.

Yes I could use a RAID to mirror

@gruber
gruber / Liberal Regex Pattern for Web URLs
Last active April 22, 2024 19:02
Liberal, Accurate Regex Pattern for Matching Web URLs
The regex patterns in this gist are intended only to match web URLs -- http,
https, and naked domains like "example.com". For a pattern that attempts to
match all URLs, regardless of protocol, see: https://gist.github.com/gruber/249502
# Single-line version:
(?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|s
@sindresorhus
sindresorhus / post-merge
Last active May 2, 2024 03:18
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@thirdender
thirdender / script.js
Created September 6, 2013 17:42
Make the Next and Previous navigation reload the main section of a page using jQuery.load. history.pushState is used to keep the URL in the location bar up to date, and the loading of the content is done with a touch of animation.
// History logic: http://adhockery.blogspot.com/2011/02/javascripts-history-object-pushstate.html
if (history.pushState) {
var selector = "#main",
loadSelector = " " + selector + " > *",
container = $(selector).on("click", "nav[role='pagenavigation'] a", function() {
var href = $(this).attr("href");
$("html, body").animate({ "scrollTop": 0 }, 400);
history.pushState({ "path": href }, null, href);
container.
animate({ "opacity": 0 }, 400).