Skip to content

Instantly share code, notes, and snippets.

View gerbal's full-sized avatar

Grant McLendon gerbal

  • Madison
  • 17:28 (UTC -06:00)
View GitHub Profile
@Nezteb
Nezteb / elixir-language-server-comparison.md
Last active November 8, 2024 19:10
Elixir Language Server Comparisons
@vi
vi / split_by_silence_kf.sh
Last active December 5, 2022 14:40
Video-enhanced split_by_silence.sh script.
#!/bin/bash
IN=$1
OUT=$2
true ${SD_PARAMS:="-55dB:d=0.3"};
true ${MIN_FRAGMENT_DURATION:="20"};
export MIN_FRAGMENT_DURATION
if [ -z "$OUT" ]; then
# Load the contents of the receipt file
receipt_file = open('./receipt_data.bin', 'rb').read()
# Use asn1crypto's cms definitions to parse the PKCS#7 format
from asn1crypto.cms import ContentInfo
pkcs_container = ContentInfo.load(receipt_file)
# Extract the certificates, signature, and receipt_data
certificates = pkcs_container['content']['certificates']
signer_info = pkcs_container['content']['signer_infos'][0]
@AndrewDryga
AndrewDryga / erl-observe.sh
Last active July 11, 2023 01:20
Script for connecting Erlang Observer to remote node hosted in Kubernetes
#!/bin/bash
# This script provides easy way to debug remote Erlang nodes that is running in a kubernetes cluster.
# Usage: ./erl-observe.sh -l app=my_all -n default -c erlang_cookie
#
# Don't forget to include `:runtime_tools` in your mix.exs application dependencies.
set -e
# Trap exit so we can try to kill proxies that has stuck in background
function cleanup {
echo " - Stopping kubectl proxy."
@shahdhiren
shahdhiren / P12toPEM.txt
Created September 9, 2016 14:57
Convert P12 file for Push Notification to PEM format
Development Phase:
Step 1: Create Certificate .pem from Certificate .p12
Command: openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
Step 2: Create Key .pem from Key .p12
Command : openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12
Step 3: Optional (If you want to remove pass phrase asked in second step)
Command : openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem
@pylover
pylover / a2dp.py
Last active August 11, 2024 06:11
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3
"""Fixing bluetooth stereo headphone/headset problem in debian distros.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
Licence: Freeware
@mschoch
mschoch / elasticsearch-couchbase-cbugg.Dockerfile
Last active January 13, 2016 16:12
Dockerfile for elasticsearch-couchbase (cbugg specific build)
FROM dustin/tiny
MAINTAINER Marty Schoch "[email protected]"
ADD https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.deb /tmp/elasticsearch-0.20.2.deb
RUN apt-get update
RUN apt-get install -y openjdk-7-jre-headless
RUN dpkg -i /tmp/elasticsearch-0.20.2.deb
RUN rm /tmp/elasticsearch-0.20.2.deb