Skip to content

Instantly share code, notes, and snippets.

View ph4r05's full-sized avatar
🎯
Focusing

Dušan Klinec ph4r05

🎯
Focusing
View GitHub Profile
@mattrude
mattrude / sks-dump-script.sh
Last active March 4, 2021 15:39
A simple script to export the full database of a sks server to a chosen location.
#!/bin/bash
# This script will stop the sks server, dump it's contents to
# the $PREDIR, then restart the sks server.
#
# Matt Rude <matt@mattrude.com> PGP: 0xDD23BF73
# URL: https://gist.github.com/mattrude/b0ac735d07b0031bb002
SKSDATE=`date +%Y-%m-%d`
USER="debian-sks"
@weiss
weiss / pass-address.patch
Created July 4, 2014 11:42
Also pass the client IP address to external ejabberd authentication script
From holger@zedat.fu-berlin.de Mon Sep 17 00:00:00 2001
From: Holger Weiss <holger@zedat.fu-berlin.de>
Date: Mon, 14 Apr 2014 17:10:49 +0200
Subject: [PATCH] Pass client IP address to authentication script
---
src/ejabberd_auth.erl | 10 +++++++++-
src/ejabberd_auth_external.erl | 34 +++++++++++++++++++---------------
src/ejabberd_c2s.erl | 2 +-
src/extauth.erl | 11 +++++++++--
@dnikonov
dnikonov / TEAMVIEWER: MAC OS CHANGE ID
Created April 11, 2014 15:38
TEAMVIEWER: MAC OS CHANGE ID
defaults delete ~/Library/Preferences/com.teamviewer.teamviewer9.plist
defaults delete ~/Library/Preferences/com.teamviewer.teamviewer9.Machine.plist
sudo defaults delete /Library/Preferences/com.teamviewer.teamviewer9.plist
rm -f ~/Library/Preferences/com.teamviewer.teamviewer9.plist
rm -f ~/Library/Preferences/com.teamviewer.teamviewer9.Machine.plist
sudo rm -f /Library/Preferences/com.teamviewer.teamviewer9.plist
@cbednarski
cbednarski / camera.py
Last active February 17, 2024 05:54
Webcam capture for python - Pops up a preview from your webcam and snaps a picture when you press 'q'
import cv2
# Windows dependencies
# - Python 2.7.6: http://www.python.org/download/
# - OpenCV: http://opencv.org/
# - Numpy -- get numpy from here because the official builds don't support x64:
# http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
# Mac Dependencies
# - brew install python
@miku
miku / app.py
Last active March 11, 2019 18:10
Minimal flask + eventlet example.
#!/usr/bin/env python
# http://stackoverflow.com/questions/14180179/eventlet-spawn-doesnt-work-as-expected/14180227#14180227
from flask import Flask
import time
import eventlet
eventlet.monkey_patch()
app = Flask(__name__)
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/