Skip to content

Instantly share code, notes, and snippets.

View jbcpollak's full-sized avatar

Joshua Chaitin-Pollak jbcpollak

View GitHub Profile
@jbcpollak
jbcpollak / validation-pr.yaml
Created March 3, 2023 19:02
Validating / Linting your PR summary with a JIRA ticket
name: "[Validation] Pull Request"
on:
pull_request:
# By default, a workflow only runs when a pull_request's activity type is opened, synchronize, or reopened. We
# explicity override here so that PR titles are re-linted when the PR text content is edited.
#
# Possible values: https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request
types: ["opened", "edited", "reopened", "synchronize"]
branches:
- 'main**'
@jbcpollak
jbcpollak / restart-bluetooth.sh
Created January 30, 2023 21:09
A quick script to restart Bluetooth on Ubuntu or PopOS! 20.04, 22.04, etc
#!/bin/bash
if [[ $(id -u) -ne 0 ]]; then
echo "Must run as root"
exit 1
fi
systemctl stop bluetooth
hciconfig hci0 down
rmmod btusb
@jbcpollak
jbcpollak / delete-stale-branches.sh
Last active January 24, 2022 18:29 — forked from gparlakov/delete-stale-branches.sh
Delete Stale Branches
#!/usr/bin/env bash
while getopts "d" opt; do
case $opt in
d) dryRunOpt="--dry-run";;
esac
done
UPSTREAM=origin
BASE=main
UPSTREAM_BASE="$UPSTREAM/$BASE"

Keybase proof

I hereby claim:

  • I am jbcpollak on github.
  • I am c11k (https://keybase.io/c11k) on keybase.
  • I have a public key ASDmtwOFCwtCfoRUdcn930atyNiC4CWMqDUyh2E7yTnWTAo

To claim this, I am signing this object:

@jbcpollak
jbcpollak / App.java
Last active January 13, 2016 16:39
Spring-Boot VFS for Stripes
@Configuration
@Import({ApplicationConfiguration.class})
@SpringBootApplication
public class App extends SpringBootServletInitializer {
static {
VFS.addImplClass(SpringBootVfs.class);
}
@Override
VERSION:
6.10.0-b78bf10
REQUEST: [2015-02-19T12:01:01-05:00]
GET /v2/spaces/22d24a91-2171-41a0-8caa-4da27ed50536/apps?q=name%3Amy-app&inline-relations-depth=1 HTTP/1.1
Host: api.run.pivotal.io
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Using manifest file /Users/me/src/my/app/manifest.yml Updating app my-app in org AssuredLabor / space staging as me@mycompany.com... OK Uploading my-app... Uploading app files from: /Users/me/src/my/app Uploading 15.4M, 5781 files 11.2M uploaded... Done uploading OK Stopping app my-app in org AssuredLabor / space staging as me@mycompany.com... OK Starting app my-app in org AssuredLabor / space staging as me@mycompany.com... -----> Downloaded app package (6.7M) Cloning into '/tmp/buildpacks/php-buildpack'... 2015-02-18 19:37:26,805 [INFO] cloudfoundry - CloudFoundry Initialized. 2015-02-18 19:37:26,805 [DEBUG] cloudfoundry - CloudFoundry Context Setup [{'LANG': <build_pack_utils.utils.FormattedDictWrapper object at 0x17625d0>, 'MEMORY_LIMIT': <build_pack_utils.utils.FormattedDictWrapper object at 0x1762790>, 'TMPDIR': '/tmp', 'VCAP_SERVICES': {}, 'VCAP_APPLICATION': {u'name': u'my-app', u'limits': {u'mem': 256, u'fds': 16384, u'disk': 1024}, u'space_id': u'22d24a91-2171-4
This file has been truncated, but you can view the full file.
Using manifest file /Users/jpollak/src/my/mobileweb/manifest.yml Updating app my-mobileweb in org mycompany / space staging as me@mycompany.com... OK Uploading my-mobileweb... Uploading app files from: /Users/jpollak/src/my/mobileweb Uploading 30.8M, 11565 files 15.3M uploaded... 29.3M uploaded... Done uploading OK Stopping app my-mobileweb in org mycompany / space staging as me@mycompany.com... OK Starting app my-mobileweb in org mycompany / space staging as me@mycompany.com... -----> Downloaded app package (14M) Cloning into '/tmp/buildpacks/php-buildpack'... 2015-02-17 20:59:29,348 [INFO] cloudfoundry - CloudFoundry Initialized. 2015-02-17 20:59:29,349 [DEBUG] cloudfoundry - CloudFoundry Context Setup [{'LANG': 'en_US.UTF-8', 'MEMORY_LIMIT': '256m', 'TMPDIR': '/tmp', 'VCAP_SERVICES': {}, 'VCAP_APPLICATION': {u'name': u'my-mobileweb', u'limits': {u'mem': 256, u'fds': 16384, u'disk': 1024}, u'space_id': u'22d24a91-2171-41a0-8caa-4da27ed50536', u'application_uris': [u'my
Using manifest file /Users/me/src/my/app/manifest.yml Updating app my-app in org MyCompany / space staging as me@mycompany.com... OK Uploading my-app... Uploading app files from: /Users/me/src/my/app Uploading 30.7M, 11564 files 15.3M uploaded... 22.6M uploaded... Done uploading OK Stopping app my-app in org MyCompany / space staging as me@mycompany.com... OK Starting app my-app in org MyCompany / space staging as me@mycompany.com... -----> Downloaded app package (14M) Cloning into '/tmp/buildpacks/php-buildpack'... 2015-02-17 20:41:46,993 [INFO] cloudfoundry - CloudFoundry Initialized. 2015-02-17 20:41:46,993 [DEBUG] cloudfoundry - CloudFoundry Context Setup [{'LANG': 'en_US.UTF-8', 'MEMORY_LIMIT': '256m', 'TMPDIR': '/tmp', 'VCAP_SERVICES': {}, 'VCAP_APPLICATION': {u'name': u'my-app', u'limits': {u'mem': 256, u'fds': 16384, u'disk': 1024}, u'space_id': u'22d24a91-2171-41a0-8caa-4da27ed50536', u'application_uris': [u'my-app.cfapps.io'], u'version': u'cb12947a-9fb7-4647-b
@jbcpollak
jbcpollak / CDataXmlOutputFactoryImpl.java
Created January 8, 2014 05:14
An XmlFactory and XmlOutputWriter used to force all fields to be wrapped with CDATA.
package xml;
import java.io.OutputStream;
import java.io.Writer;
import javax.xml.stream.*;
import javax.xml.transform.Result;
import com.fasterxml.aalto.stax.OutputFactoryImpl;