Skip to content

Instantly share code, notes, and snippets.

@sbolel
sbolel / instagram-comment-activity-deleter.js
Created April 2, 2024 14:21
Automate the deletion of all your Instagram comments from the 'Your Activity' section. Perfect for quick digital clean-up.
/**
* Deletes all user's comments from a specific Instagram page.
* This function automates the process of selecting and deleting user comments
* from the "Your Activity" section on Instagram.
*
* How to use:
* 1. Navigate to the Instagram comments page by going to:
* https://www.instagram.com/your_activity/interactions/comments
* 2. Open the developer console in your web browser:
* - Chrome/Firefox: Press Ctrl+Shift+J (Windows/Linux) or Cmd+Option+J (Mac)
@sbolel
sbolel / to_markdown-plugin-zsh.md
Last active April 3, 2024 08:12
Oh My Zsh plugin to output the contents of multiple files into a single markdown file with code blocks

Markdown File Generator Script

This Oh My Zsh plugin combines the contents of multiple files into a single markdown document, supporting syntax highlighting based on file extensions. If an output file is not specified, the script copies the content to the clipboard, making it easy to paste anywhere.

Features

  • Combines multiple files into one markdown document.
  • Automatically adds syntax highlighting based on the file extension.
  • Option to copy combined content to the clipboard if no output file is specified.
@sbolel
sbolel / ._macos.zsh
Last active May 22, 2024 10:54
macOS Fresh Install Setup (zsh)
#!/usr/bin/env zsh
# ~/.macos — https://mths.be/macos
# Modified by Kent C. Dodds, Sinan Bolel
# Run without downloading:
# curl https://raw.githubusercontent.com/<THIS_URL> | bash
### UPDATE THIS TO YOUR GITHUB NOREPLY EMAIL:
__GITHUB_EMAIL__="1234567+username@users.noreply.github.com"
@sbolel
sbolel / sign-previous-commits.md
Created June 21, 2023 16:48
How to sign previous commits in a PR

To sign all your commits in the Git Pull Request (PR), you can use a combination of git rebase and git commit --amend. Here are the steps:

  1. Before starting, make sure you've configured Git to use your signing key. You can do this with:

    git config --global user.signingkey YOUR_SIGNING_KEY
    git config --global commit.gpgsign true

    Replace YOUR_SIGNING_KEY with your GPG key ID.

  2. Then you need to start an interactive rebase with the parent of your first commit. If you don't know what commit that is, you can use git log to display your commit history. Once you have your commit hash, start the rebase:

@sbolel
sbolel / slack-reload-unreads.js
Last active August 18, 2023 17:36
Reload Slack unreads view whenever there are new unreads
;(function (d) {
if (!slackDebug?.activeTeamId) {
slackDebug?.enable()
}
const UPDATE_ACTION = 'ACTION_UPDATE_UNREAD_COUNTS'
const NEW_DNM_BTN_SEL = '.c-link--button.p-unreads_view__show_newer'
const NEW_BTN_SEL = '.c-button.c-button--primary.c-button--medium'
const HEADER_BTN_SEL =
'.c-button-unstyled.p-ia__view_header__button.p-ia__view_header__button--with_label'
@sbolel
sbolel / tinder-auto-swiper.js
Created March 27, 2022 23:30
Tinder Auto Swipe Right via JS Console
/**
* @module sbolel/tinder-auto-swiper
* Usage: copy/paste following scripts in the dev console and run
*/
/**
* Make the tiny profile cards bigger
*/
(function() {
const css = `
@sbolel
sbolel / Convert .mov or .MP4 to .gif.md
Created August 21, 2021 07:21 — forked from SheldonWangRJT/Convert .mov or .MP4 to .gif.md
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@sbolel
sbolel / mousemover.py
Created July 29, 2021 03:58
MacOS Mouse Mover (Python) - prevent sleep while idle
import sys
import sched
import time
from Quartz.CoreGraphics import CGEventCreateMouseEvent, kCGMouseButtonLeft, CGEventPost, kCGHIDEventTap, kCGEventMouseMoved, kCGEventLeftMouseDown, kCGEventLeftMouseUp, CGEventCreate, CGEventGetLocation
def mouseevent(type, posx, posy):
event = CGEventCreateMouseEvent(None, type, (posx, posy), kCGMouseButtonLeft)
CGEventPost(kCGHIDEventTap, event)
def mousemove(posx, posy):
@sbolel
sbolel / _shell_snippets.md
Last active June 10, 2021 16:45
Shell Snippets: assorted helpful snippets (sh/zsh/bash)

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.