Skip to content

Instantly share code, notes, and snippets.

View sbolel's full-sized avatar
:shipit:

Sinan Bolel sbolel

:shipit:
View GitHub Profile
@tomdavies
tomdavies / .eslintrc.js
Last active January 17, 2021 21:03
Make eslint-loader (+ prettier) play nice with gridsome
module.exports = {
root: true,
env: {
node: true,
},
parserOptions: {
parser: "babel-eslint",
},
settings: {
'import/resolver': 'webpack',
@Gazzell
Gazzell / .eslintrc
Last active January 31, 2024 18:28
React, typescript, use craco to set custom tests paths and import aliases
{
"extends": [
"eslint-config-react-app"
],
"plugins": ["react", "import"],
"rules": {
"import/no-unresolved": "error"
},
"settings": {
"import/parsers": {
@sbolel
sbolel / edge-cookies-blocked-domains.js
Last active May 10, 2021 00:55
Microsoft Edge: cookies settings - bulk add/remove blocked domains
/**
* Usage:
* - navigate to "edge://settings/content/cookies" and open devtools
* - add/remove tlds to `tlds` array below
* - copy and paste script into dev console
* - finally, call either `addAll()` or `removeAll()
*
* @example add domains
* addAll()
*
@dagronf
dagronf / Notification+Visibility.swift
Last active April 13, 2024 12:50
Observe all notifications sent through a NotificationCenter or DistributedNotificationCenter
// Observe all notifications generated by the default NotificationCenter
NotificationCenter.default.addObserver(
forName: nil, object: nil, queue: nil) { notification in
Swift.print("Notification: \(notification.name.rawValue), Object: \(notification.object)")
}
// Observe all notifications generated by the default DistributedNotificationCenter
DistributedNotificationCenter.default().addObserver(
forName: nil, object: nil, queue: nil) { notification in
Swift.print("Notification: \(notification.name.rawValue), Object: \(notification.object)")
@zhuowei
zhuowei / Ensemble.plist
Last active September 18, 2023 06:26
Put this file as /Library/Preferences/FeatureFlags/Domain/Ensemble.plist and reboot to (hopefully) turn on Universal Control on macOS 12
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- not sure which one it is, so set both -->
<key>Ensemble</key>
<dict>
<key>Enabled</key>
<true/>
</dict>
@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 / instagram-comment-activity-deleter.js
Last active August 7, 2025 20:20
Instagram Comment Activity Deleter: Automate the deletion of all your Instagram comments from the 'Your Activity' section. Perfect for quick digital clean-up.
/**
* This script automates the process of deleting your own Instagram comments.
* It deletes comments in batches to avoid hitting rate limits or breaking the page.
*
* WARNING: This function directly manipulates the DOM and depends on the current HTML
* structure of Instagram's website to work. If Instagram implements changes to the
* activity page layout, structure, or functionality, this script may break or cause
* unexpected behavior. Use at your own risk and always review code before running it.
*
* How to use: