Skip to content

Instantly share code, notes, and snippets.

@shaktidhar
shaktidhar / keybase.md
Created September 14, 2014 12:46
Keybase Account

Keybase proof

I hereby claim:

  • I am shaktidhar on github.
  • I am acumen_sd (https://keybase.io/acumen_sd) on keybase.
  • I have a public key whose fingerprint is 10F9 5D2F BD66 E1DC 6707 098C 0404 0E8B C636 3FF6

To claim this, I am signing this object:

@dave-maldonado
dave-maldonado / freepbx_distro_upgrade.sh
Last active August 29, 2015 14:04
An upgrade script for the FreePBX distro
#!/bin/bash
# bash script to upgrade FreePBX distro
# Dave Maldonado @ TeleVoIPs
FINAL_VER="5.211.65-15" # change and add case to main logic to add new version
DOWNLOAD_URL="http://upgrades.freepbxdistro.org/stable"
DONE="false"
# PROCEDURE: find current version of FreePBX distro
@tyrells
tyrells / disable-service.yml
Last active October 19, 2023 20:53
Ansible task to stop service even if it doesn't exist
# This task will stop and disable a service without failing if the service does not exist.
# Requires Ansible 1.4 or newer.
# Update Dec 2016: Have rewritten this for the latest version of ansible and put conditions for both Ubuntu and CentOS
- name: "disable unused services"
service: name={{item}} state=stopped enabled=no
register: command_result
failed_when: "unused_disable|failed and ('find' not in unused_disable.msg and 'found' not in unused_disable.msg)"
with_items:
@thomasfr
thomasfr / autossh.service
Last active June 19, 2025 05:38
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@timharding
timharding / verifying_a_download.txt
Created February 23, 2014 23:56
Quick instructions for verifying a downloaded file
# verifying an md5 checksum...
md5 electrum-1.9.7.dmg
# then compare checksum
# verifying a gpg sig...
# 1. find the hex key id for the signer's public key
gpg --recv-keys 0x22453004695506FD
# 2. download the file and the .asc signature file for that file then
# 3. validate the file
gpg --verify electrum-1.9.7.dmg{.asc.txt,}
@nzjrs
nzjrs / rospy_logging.py
Created January 30, 2014 16:06
Reconnect python logging calls with the ROS logging system
class ConnectPythonLoggingToROS(logging.Handler):
MAP = {
logging.DEBUG:rospy.logdebug,
logging.INFO:rospy.loginfo,
logging.WARNING:rospy.logwarn,
logging.ERROR:rospy.logerr,
logging.CRITICAL:rospy.logfatal
}
@ysaotome
ysaotome / install_pyenv.sh
Last active August 7, 2021 13:27
pyenv install for CentOS 6.5 x86_64
#!/bin/zsh
# pyenv install for CentOS 6.5 x86_64
yum install -y gcc gcc-c++ make git patch openssl-devel zlib-devel readline-devel sqlite-devel bzip2-devel
git clone git://github.com/yyuu/pyenv.git ~/.pyenv
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
@jprjr
jprjr / Dockerfile
Created November 26, 2013 23:09
Setting up pyenv in docker
FROM tianon/centos-null:5.9
RUN rpm -i http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
RUN yum -y update
RUN yum -y install gcc git curl make zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl openssl-devel
RUN useradd -m python_user
RUN ln -s /proc/self/fd /dev/fd
@John07
John07 / HLS_to_mp4
Last active October 11, 2020 01:20
Save/record HTTP Live Stream (short HLS, the kind of live stream that can be played by iOS devices) to disk as mp4 file
ffmpeg -re -i http://url.com/playlist.m3u8 -c copy -bsf:a aac_adtstoasc output.mp4
@grenade
grenade / sane-gnome-settings.sh
Last active February 4, 2024 08:11
my personal gnome and fedora setup preferences
# Sane settings for Gnome
gsettings set org.gnome.desktop.background show-desktop-icons true
gsettings set org.gnome.desktop.interface clock-show-date true
gsettings set org.gnome.settings-daemon.plugins.xsettings antialiasing 'grayscale'
gsettings set org.gnome.settings-daemon.plugins.xsettings hinting 'slight'
gsettings set org.gnome.desktop.interface text-scaling-factor '1.0'
gsettings set org.gnome.desktop.interface monospace-font-name "Monospace 10"
gsettings set org.gnome.desktop.interface document-font-name 'Sans 10'
gsettings set org.gnome.desktop.interface font-name 'Cantarell 10'
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita'