-i - ignore errors
-c - continue
-t - use video title as file name
--extract-audio - extract audio track
| #!/bin/sh | |
| # Darkify Slack on Mac OS or Linux. | |
| # curl https://gist.githubusercontent.com/ryanpcmcquen/8a7ddc72460eca0dc1f2dc389674dde1/raw/darkify_slack.sh | sh | |
| if [ "`uname -s`" = "Darwin" ]; then | |
| SLACK_INTEROP_JS="/Applications/Slack.app/Contents/Resources/app.asar.unpacked/dist/ssb-interop.bundle.js" | |
| else | |
| SLACK_INTEROP_JS="/usr/lib/slack/resources/app.asar.unpacked/dist/ssb-interop.bundle.js" | |
| fi |
| pipeline { | |
| agent { node { label 'swarm-ci' } } | |
| environment { | |
| TEST_PREFIX = "test-IMAGE" | |
| TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}" | |
| TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}" | |
| REGISTRY_ADDRESS = "my.registry.address.com" | |
| SLACK_CHANNEL = "#deployment-notifications" |
This script is modeled after tee (see [man tee][2]) and works on Linux, macOS, Cygwin, WSL/WSL2
It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable.
This project started as an answer to the StackOverflow question: [How can I copy the output of a command directly into my clipboard?][3]
| #!/usr/bin/env python | |
| # | |
| # Copyright (c) 2016, PagerDuty, Inc. <info@pagerduty.com> | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions are met: | |
| # * Redistributions of source code must retain the above copyright | |
| # notice, this list of conditions and the following disclaimer. | |
| # * Redistributions in binary form must reproduce the above copyright |
| node { | |
| echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
| echo 'No quotes, pipeline command in single quotes' | |
| sh 'echo $BUILD_NUMBER' // 1 | |
| echo 'Double quotes are silently dropped' | |
| sh 'echo "$BUILD_NUMBER"' // 1 | |
| echo 'Even escaped with a single backslash they are dropped' | |
| sh 'echo \"$BUILD_NUMBER\"' // 1 | |
| echo 'Using two backslashes, the quotes are preserved' | |
| sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
Source: http://chris.beams.io/posts/git-commit/#seven-rules
Options included below:
docker-composebrewThis gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew any longer. Instead consider adding a barebones docker-compose.yml for each project and run docker-compose up to start each project's mysql service.
| -- WARNING | |
| -- WARNING THIS IS PROBABLY INCOMPLETE AND MAY BREAK CONFLUENCE. USE AT YOUR OWN RISK | |
| -- WARNING | |
| -- Migrate a Confluence users activity to another user | |
| SELECT * FROM user_mapping WHERE lower_username='old_username' OR lower_username='new_username'; | |
| +----------------------------------+------------------+----------------+ | |
| | user_key | username | lower_username | | |
| +----------------------------------+------------------+----------------+ | |
| | ff8080814094fe77014094ffd60c0115 | old_username | old_username | |
| #/usr/bin/env python | |
| # encoding: utf-8 | |
| from __future__ import print_function, unicode_literals | |
| import re | |
| import sys | |
| def safe_call(func, *args, **kwargs): | |
| try: | |
| return func(*args, **kwargs) |