Skip to content

Instantly share code, notes, and snippets.

@wolfg1969
wolfg1969 / download_from_dropbox.py
Created December 1, 2023 03:08 — forked from hannesdatta/download_from_dropbox.py
Python script to download entire folder/directory structure from a (shared) Dropbox folder to a local computer
################################################################
# DOWNLOAD ENTIRE FOLDER STRUCTURE FROM DROPBOX TO LOCAL DRIVE #
################################################################
# Instructions:
# (1) install dropbox API using pip
# > pip install dropbox
# (2) Create application to make requests to the Dropbox API
# - Go to: https://dropbox.com/developers/apps
@wolfg1969
wolfg1969 / volumio-gpio-buttons.py
Created October 11, 2017 12:36 — forked from ivesdebruycker/volumio-gpio-buttons.py
Control Volumio2 with GPIO buttons
# https://volumio.org/forum/gpio-pins-control-volume-t2219.html
# https://pypi.python.org/pypi/socketIO-client
# https://volumio.github.io/docs/API/WebSocket_APIs.html
import RPi.GPIO as GPIO
import time
import subprocess
from socketIO_client import SocketIO, LoggingNamespace
@wolfg1969
wolfg1969 / fontdemo.py
Created July 14, 2016 00:57 — forked from dbader/fontdemo.py
For my Raspberry Pi internet radio project I needed a way to render text suitable for a low resolution monochrome LCD. This article describes how to render 1-bit text using FreeType and Python. See http://dbader.org/blog/monochrome-font-rendering-with-freetype-and-python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Needs freetype-py>=1.0
# For more info see:
# http://dbader.org/blog/monochrome-font-rendering-with-freetype-and-python
# The MIT License (MIT)
#
# Copyright (c) 2013 Daniel Bader (http://dbader.org)
tell application "System Events"
-- get current clipboard contents as a string
set CurrentClipboard to the clipboard as string
-- set the clipboad to your password
set the clipboard to "Y0urVPNPa$$w0rd"
-- start playing with the VPN
tell current location of network preferences
#! /usr/bin/env python
import redis
import random
import pylibmc
import sys
r = redis.Redis(host = 'localhost', port = 6389)
mc = pylibmc.Client(['localhost:11222'])
@wolfg1969
wolfg1969 / ipsec.conf
Created December 13, 2012 14:46 — forked from anonymous/ipsec.conf
l2tp vpn by storngwan and xl2tpd
config setup
nat_traversal=yes
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12
charonstart=yes
plutostart=yes
conn L2TP
authby=psk
pfs=no
rekey=no
type=tunnel
@wolfg1969
wolfg1969 / script.sh
Created September 5, 2012 10:45 — forked from kapkaev/script.sh
centOS gitosis
#step 1
yum -y install python-setuptools
#step 2
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# or
# rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
#step 3
# if you using centOS 6.2 enable rpmforge-extras (enabled =1)