Skip to content

Instantly share code, notes, and snippets.

View nikhilbadyal's full-sized avatar
👨‍💻
Writing O(1)

Nikhil Badyal nikhilbadyal

👨‍💻
Writing O(1)
  • India
  • 10:21 (UTC +05:30)
View GitHub Profile
"""
Use this script to migrate notes from Samsung Notes to Google Keep.
1. Export notes from Samsung Notes as .pdf files
2. Copy those into the same folder as this script.
3. Open Google Keep in your browser
4. $ python samsungnotes2keep.py
You may need to ($ pip install keyboard pdfplumber)
"""
import pdfplumber
@wilburx9
wilburx9 / dismissible_handle_dismiss.dart
Last active February 18, 2021 17:30
Handle dismiss action of Flutter Dismissible.
handleDismiss(DismissDirection direction, int index) {
// Get a reference to the swiped item
final swipedEmail = items[index];
// Remove it from the list
items.removeAt(index);
String action;
if (direction == DismissDirection.startToEnd) {
deleteItem();
@tomaszpolanski
tomaszpolanski / analysis_options.yaml
Last active September 5, 2024 15:04
Strict Flutter lint rules
# Check https://dart-lang.github.io/linter/lints/ for lint rules documentation
# Update from http://dart-lang.github.io/linter/lints/options/options.html
analyzer:
errors:
missing_required_param: error
missing_return: error
todo: ignore
language:
strict-inference: true
@troyfontaine
troyfontaine / 1-setup.md
Last active March 19, 2026 15:54
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@c00kiemon5ter
c00kiemon5ter / create-superuser.py
Created June 16, 2017 11:31
Extend Django's management createsuperuser command to allow non-interactive creation of a superuser with a password.
"""
Extend createsuperuser command to allow non-interactive creation of a
superuser with a password.
Instructions:
mkdir -p path-to-your-app/management/commands/
touch path-to-your-app/management/__init__.py
touch path-to-your-app/management/commands/__init__.py
@renestalder
renestalder / README.md
Last active February 9, 2026 05:00
Unfollow all on Facebook

Facebook: Unfollow people and pages

See comments section for more up-to-date versions of the script. The original script is from 2014 and will not work as is.

  1. Open news feed preferences on your Facebook menu (browser)
  2. Click people or pages
  3. Scroll down (or click see more) until your full list is loaded
  4. Run the script in your browser console

Facebook will block this feature for you while you use it, depending on how much entities you try to unfollow. It automatically unblocks in a couple of hours and you will be able to continue.