Skip to content

Instantly share code, notes, and snippets.

View gpchelkin's full-sized avatar
🐝
just a human beein'

George Pchelkin gpchelkin

🐝
just a human beein'
View GitHub Profile
@knixeur
knixeur / converse.join.muc.on.click.js
Created April 16, 2015 04:18
Join a room by clicking a button using new rooms API
// Bind on click event on page startup using converse's jQuery
converse.env.jQuery(function($) {
$('#join-button').on('click', function() {
converse.rooms.open('[email protected]');
});
});
converse.initialize({
....
@yunano
yunano / vault.service
Last active August 17, 2023 08:51
/etc/systemd/system/vault.service
[Unit]
Description=vault server
Requires=network-online.target
After=network-online.target consul.service
[Service]
EnvironmentFile=-/etc/sysconfig/vault
Restart=on-failure
ExecStart=/usr/local/sbin/vault server $OPTIONS -config=/etc/vault.d
ExecStartPost=/bin/bash -c "for key in $KEYS; do /usr/local/sbin/vault unseal $CERT $key; done"
@glen-cheney
glen-cheney / encoding-video.md
Last active October 25, 2025 03:24
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@iandyh
iandyh / gist:5a1b1de9a46c6fa385f1
Last active February 19, 2020 16:33
Install Git with OpenSSL on Ubuntu
# install git with openssl
ENV GIT_VERSION 1.9.1
ENV PLATFORM 1ubuntu0.1
ENV GIT ${GIT_VERSION}-${PLATFORM}
RUN apt-get install -y build-essential dpkg-dev
RUN mkdir -p git-openssl
WORKDIR /tmp/git-openssl
RUN apt-get source git=1:${GIT}
RUN apt-get -y build-dep git
RUN dpkg-source -x git_${GIT}.dsc
@0xDE57
0xDE57 / config.md
Last active October 24, 2025 12:09
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@pescobar
pescobar / build-git.sh
Created October 5, 2015 07:14
compile git with openssl instead of gnutls
#!/usr/bin/env bash
# Clear out all previous attempts
rm -rf "/tmp/source-git/"
# Get the dependencies for git, then get openssl
sudo apt-get install build-essential fakeroot dpkg-dev -y
sudo apt-get build-dep git -y
sudo apt-get install libcurl4-openssl-dev -y
mkdir -p "/tmp/source-git/"
@lextoumbourou
lextoumbourou / hbase_heap.py
Last active May 10, 2019 10:20
Hbase Heap Size Calculator
def get_regionserver_heap_size(
storage_capacity_in_gb,
region_max_filesize=10737418240,
memstore_flush_size=134217728,
replication_factor=3,
memstore_heap_fraction=0.4
):
"""
Calculates heap size required based on storage requirements.
ambari-server stop
ambari-agent stop
pkill -9 java
#################################
# Remove Packages
################################
yum -y remove ambari-\*
yum -y remove hcatalog\*
yum -y remove hive\*
@brahmlower
brahmlower / koel-installation-docs_debian8.md
Last active June 8, 2021 09:03
This is installation documentation for installing Koel on Debian 8.

Installation on Debian 8

This is installation documentation for installing Koel on Debian 8.

Install Dependancies

Most packages can be installed via apt-get.

user@debian:~/$ sudo apt-get install -y apache2 mysql-server php5 php5-mysql g++ git curl

Composer

@KasparNagu
KasparNagu / requests_auth_gssapi_spnego.py
Created January 3, 2016 16:30
Spnego over GSSAPI and SSPI
from requests.auth import AuthBase
import re
import base64
import gssapi
from requests.compat import urlparse
class HTTPAuthSPNEGOGSSAPI(AuthBase):
"""Attaches HTTP GSSAPI/Kerberos Authentication to the given Request
object."""
negoRegex = re.compile('(?:.*,)*\s*Negotiate\s*([^,]*),?', re.I)