Skip to content

Instantly share code, notes, and snippets.

@eliranmal
eliranmal / gitlab-mr-links-check.md
Last active March 16, 2022 12:03
a how-to on checking for broken links on GitLab merge requests
@eliranmal
eliranmal / check-links.sh
Last active March 21, 2022 18:58
takes a list of links as input, and checks each for a successful response
@eliranmal
eliranmal / redhat-bash-prompt.md
Last active December 13, 2021 05:21
customize your prompt line to match your fedora

redhat bash prompt

customize your prompt line to match your fedora

how to

  • add this somewhere in your .bash_profile (or .bashrc)
@eliranmal
eliranmal / git-fork-update.sh
Created June 17, 2019 12:40
politely updates a fork repository from the upstream repository, by excluding merge commits so they will not appear on pull-requests to the upstream.
git fetch upstream
git checkout master
git rebase upstream/master
git push -f origin master
@eliranmal
eliranmal / compname.sh
Created June 6, 2019 20:37
changes the computer/host name in all relevant entries of the scutil
#!/usr/bin/env bash
function main() {
validate "$@"
set_name "$@"
if [[ "$2" == '-p' ]]; then
update_policy
fi
}
#
# a one-liner to get raw content from github enterprise, relying on basic authentication.
# eliminates the need to create an access token and incorporate it in the url.
#
#
# fill in the blanks:
#
# USER your login user name for authentication (you'll be prompted for password on the terminal)
# GHE_DOMAIN the github enterprise custom domain
@eliranmal
eliranmal / themes.css
Created August 18, 2017 13:59
css themes
/* - - - space - - - */
.space {
background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
color: #fff !important;
}
/* put stars elements behind everything else */
.space > :not([class^=stars]) {
#!/usr/bin/env bash
if [[ $HELP = true ]]; then
less << 'EOF'
overview
--------
migrates git-flux configurations from global to local context.
@eliranmal
eliranmal / webpack-first-error.sh
Created March 21, 2017 12:04
shows how to only output the first webpack-compiler error to the console
webpack | awk '/ERROR/{f=1} f{print; if (/@/) exit}'
@eliranmal
eliranmal / teamcity-auto-run.js
Last active August 8, 2018 22:59
periodically triggers teamcity builds. just stuff it in the dev console (but don't forget it running!)
(function (triggerIntervalSeconds) {
triggerIntervalSeconds = triggerIntervalSeconds || (60 * 5);
var runInterval = triggerIntervalSeconds * 1000;
var runBuildTimeout = 300;
function runBuild(done) {
var runBtn = jQuery("button:contains(Run)")[0];
console.log('opening build run dialog...');