Highly extensible software like Emacs, Vim, and Neovim tend to grow their own package managers. A software developer, for example, might want to install editor plugins that hook into a particular programming language's linter or language server. The programmer's text editor is therefore extended to support managing additional software to extend the text editor. If this loop continues for too long, the programmer's editor becomes more delicate and complex. The remedy for this problem is to manage software using dedicated tools apart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GITLAB_URL="https://example.gitlab.com/" | |
PROJECT_ID="2" # get this id via the repo/project's overview page | |
ACCESS_TOKEN="glpat-abc" | |
# Create a new merge request | |
curl --header "Private-Token: $ACCESS_TOKEN" \ | |
"$GITLAB_URL/api/v4/projects/$PROJECT_ID/merge_requests" \ | |
--data "source_branch=my-branch" \ | |
--data "target_branch=main" \ |
git-prebase improves on 'git rebase -i' by adding information per commit regarding which files it touched.
- Each file gets an alpha-numeric identifier at a particular column, a list of which appears below the commit list. (The identifiers wrap around after the 62nd file)
- Commits can be moved up and down safely (without conflicts) as long as their columns don't clash (they did not touch the same file).
Add the executable to your path and git will automatically expose it as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# !!! IMPORTANT !!! | |
# As of 2017-12-14, pacaur is unmaintained (https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144) | |
# For alternatives see the arch wiki: https://wiki.archlinux.org/index.php/AUR_helpers#Active | |
# pacaur seems to get occasional updates to fix breaking changes due to pacman updates though. | |
# | |
# If you are new to arch, I encourage you to at least read and understand what | |
# this script does befor blindley running it. | |
# That's why I didn't make a one-liner out of it so you have an easier time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
display dialog "Name of the browser?" default answer "Safari" | |
set inp to text returned of result | |
tell application "System Events" | |
if inp is "Google Chrome" then | |
tell application "Google Chrome" to return URL of active tab of front window | |
else if inp is "Safari" then | |
tell application "Safari" to return URL of front document | |
else if inp is "Firefox" then | |
tell application "Firefox" to activate |
-- Firstly, remove PRIMARY KEY attribute of former PRIMARY KEY
ALTER TABLE <table_name> DROP CONSTRAINT <table_name>_pkey;
-- Then change column name of your PRIMARY KEY and PRIMARY KEY candidates properly.
ALTER TABLE <table_name> RENAME COLUMN <primary_key_candidate> TO id;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* I add this to html files generated with pandoc. | |
*/ | |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |