Skip to content

Instantly share code, notes, and snippets.

View itsamoreh's full-sized avatar

Amor Kumar itsamoreh

View GitHub Profile
@itsamoreh
itsamoreh / wmctrl-center-1080p-WQHD
Last active December 13, 2016 14:07
Keyboard shortcut to center 1080p window on a WQHD display with wmctrl
sh -c "wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz && wmctrl -r :ACTIVE: -e 0,320,180,1920,1080"
@itsamoreh
itsamoreh / reset-launchpad
Last active December 11, 2021 06:24
Reset MacOS launchpad to default with non-default apps on page 2+
defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock
@itsamoreh
itsamoreh / caps-as-escape
Last active October 29, 2019 15:20
Dconf remap caps as escape - Tested on Ubuntu 16.10
dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:escape']"
@itsamoreh
itsamoreh / uBlockFilters-Tangerine.txt
Last active November 27, 2017 02:40
Tangerine.ca uBlock filters to make their new website a little bit less of a pain to use
!! TANGERINE
! Insights
www.tangerine.ca##.is-open.c-insights-carousel
! Add account upsell button
www.tangerine.ca###accountSummary_addAccount
! "What I have" useless info
www.tangerine.ca###accountSummary_whatIHave
@itsamoreh
itsamoreh / Center 1080p Window.workflow
Last active August 7, 2018 00:35
Resize the current application's window to 1920x1080 and center it on a 2560x1440 display.
-- Add this to automator and run with a keyboard shortcut.
-- System Preferences > Keyboard > Services > (Scroll to bottom and assign this script to a shortcut)
on run {input, parameters}
try
tell application (path to frontmost application as text)
activate
set the bounds of the first window to {320, 191, 2240, 1271}
end tell
on error errMsg
@itsamoreh
itsamoreh / history-sorter
Created November 1, 2018 13:52
Sort bash / zsh command history and order by frequency
history | cut -c 8- | sort | uniq -c | sort -nr
@itsamoreh
itsamoreh / base16-ocean-dark.json
Created December 18, 2021 22:51
Base 16 Ocean Dark Fig theme. Save this theme to ~/.fig/themes/base16-ocean-dark.json and run "fig theme base16-ocean-dark".
{
"author": {
"name": "Amor Kumar",
"twitter": "@itsamoreh",
"github": "itsamoreh"
},
"version": "1.0",
"theme": {
"textColor": "#c0c5ce",
"backgroundColor": "#2b303b",
@itsamoreh
itsamoreh / wordpress-alignment-fix.css
Last active November 22, 2023 19:34
Fix for WordPress floated images going outside of contentSize area. Don't forget to change the calc values in the media query on line 35 to match your contentSize and gap. This file is PostCSS.
/* assets/css/alignments.css */
body {
.is-layout-constrained {
> .alignleft {
margin: var(--wp--custom--spacing--gap);
margin-left: 0;
padding-left: 0;
}
> .alignright {
/*
Global WordPress Layout
Ensures that the footer is always at the bottom of
the page even if the page doesn't have enough content.
See https://itsamoreh.dev/full-height-layouts-in-wordpress-block-themes/
*/
.wp-site-blocks {
@itsamoreh
itsamoreh / change-posts-to-news.php
Created June 12, 2024 15:55
Change default "Posts" to "News" across WordPress admin - including all labels and the dashicon.
<?php
/**
* Change Posts to News.
*
* @author Amor Kumar (itsamoreh)
*/
/**
* Change the dashboard menu labels.
*/