Skip to content

Instantly share code, notes, and snippets.

Avatar

Pratyush Mittal pratyushmittal

View GitHub Profile
@pratyushmittal
pratyushmittal / .env
Last active Sep 7, 2022
A SwiftBar script to show unread emails in menu-bar
View .env
EMAIL_ID=foobar@gmail.com
PASSWORD=your-app-password
@pratyushmittal
pratyushmittal / justfile
Created Jul 31, 2022
I like to manually mark each line as checked during code reviews. This script allows that. Blog post about it: https://fully-faltoo.com/p/reviewing-each-line-of-code/
View justfile
default:
just --list
review:
#!/usr/bin/env bash
cd {{invocation_directory()}}
source_branch_name=$(git branch --show-current)
review_branch_name=review-${source_branch_name}
git merge main
@pratyushmittal
pratyushmittal / block.js
Created Jun 25, 2015
AngularJS - Adding content outside ng-view
View block.js
function block($document) {
function blockLink(scope, elem, attrs) {
var element = elem[0];
element.removeAttribute('block');
element.removeAttribute('target');
var targetTag = 'block-' + attrs.target;
var blockElem = angular.element($document).find(targetTag)[0];
blockElem.innerHTML = '';
blockElem.appendChild(element);
scope.$on('$destroy', function() {