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
#!/usr/bin/env python3
import os
import sys
from string import Template
for in_line in sys.stdin.readlines():
out_line = Template(in_line).safe_substitute(os.environ)
sys.stdout.write(out_line)
@gpchelkin
gpchelkin / termux-pinger.md
Last active September 18, 2024 13:46
Termux Bash script for checking internet connection by periodically pinging some host and showing notifications with LED and vibration when connection is lost or established

termux-pinger.sh

Termux Bash script for monitoring internet connection by periodically checking (pinging some host) and showing notifications with LED and vibration when connection is lost or established using termux-notification API

Requirements

  • Termux
  • Termux:API add-on
  • Execute the following commands to place script termux-pinger.sh into the home directory with the proper permissions (get the link to the raw termux-pinger.sh below):
curl -o ~/termux-pinger.sh https://gist.githubusercontent.com/gpchelkin/b18916c56ff7c759860725a28a747242/raw/b8aa96bb2c7e1dac84f854980eaeb6cd194dde4f/termux-pinger.sh
chmod +x ~/termux-pinger.sh
@nowrep
nowrep / qupzillaflatpak.sh
Created December 23, 2016 11:01
QupZilla Flatpak
# Install KDE runtime
wget http://distribute.kde.org/kdeflatpak.gpg
flatpak --user remote-add kde http://distribute.kde.org/flatpak-testing/ --gpg-import=kdeflatpak.gpg
flatpak --user install kde org.kde.Platform
# Install QupZilla
wget https://qupzilla.com/flatpak/qupzillaflatpak.asc
flatpak --user remote-add qupzilla https://qupzilla.com/flatpak/repo/ --gpg-import=qupzillaflatpak.asc
flatpak --user install qupzilla org.qupzilla.QupZilla
@IgnoredAmbience
IgnoredAmbience / 99-noto-mono-color-emoji.conf
Last active October 25, 2024 06:01
Noto Emoji Color fontconfig for Konsole
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
Noto Mono + Color Emoji Font Configuration.
Currently the only Terminal Emulator I'm aware that supports colour fonts is Konsole.
Usage:
0. Ensure that the Noto fonts are installed on your machine.
1. Install this file to ~/.config/fontconfig/conf.d/99-noto-mono-color-emoji.conf
override def connect(url: String, info: Properties): Connection = {
val connectionProps = Krb5SqlServer.connectionProperties(url)
val keytabFile = connectionProps(Krb5SqlServer.keytabFile)
val principal = connectionProps(Krb5SqlServer.principalKey)
val config = new Configuration()
config.addResource(&quot;/etc/hadoop/conf/hdfs-site.xml&quot;)
config.addResource(&quot;/etc/hadoop/conf/core-site.xml&quot;)
config.addResource(&quot;/etc/hadoop/conf/mapred-site.xml&quot;)
# Grant-ComputerJoinPermission.ps1
# Written by Bill Stewart ([email protected])
#
# Grants an AD identity the ability to join one or more computers to the
# domain.
#requires -version 2
<#
.SYNOPSIS
@nyboer
nyboer / pulseaudio-bluetooth.conf
Last active August 8, 2018 10:24
This allows users to add bluetooth audio sinks to pulseaudio for CHIP computers without a desktop manager.
<!-- This configuration file specifies the required security policies
for PulseAudio Bluetooth integration. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
<policy user="pulse">
@bkaradzic
bkaradzic / orthodoxc++.md
Last active October 19, 2025 16:39
Orthodox C++

Orthodox C++

This article has been updated and is available here.

@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)
@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