Skip to content

Instantly share code, notes, and snippets.

View ehnydeel's full-sized avatar

Andreas Kleinbub ehnydeel

View GitHub Profile
@ehnydeel
ehnydeel / Python SimpleHTTPServer with SSL
Created November 16, 2017 22:47 — forked from rozifus/Python SimpleHTTPServer with SSL
Python SimpleHTTPServer with SSL
# useful for running ssl server on localhost
# which in turn is useful for working with WebSocket Secure (wss)
# copied from http://www.piware.de/2011/01/creating-an-https-server-in-python/
@ehnydeel
ehnydeel / Python SimpleHTTPServer with SSL
Created November 16, 2017 22:47 — forked from rozifus/Python SimpleHTTPServer with SSL
Python SimpleHTTPServer with SSL
# useful for running ssl server on localhost
# which in turn is useful for working with WebSocket Secure (wss)
# copied from http://www.piware.de/2011/01/creating-an-https-server-in-python/
@ehnydeel
ehnydeel / gist:4f635e25787b7973fec3fa084b2909f2
Created October 27, 2016 08:26
Update all global npm-packages
#Check outdated npm-packages:
npm outdated -g --depth=0
#npm-upgrade.sh
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2)
do
npm -g install "$package"
#!/bin/sh
osascript -e 'tell application "Microsoft Database Daemon" to quit'
osascript -e 'tell application "Microsoft AU Daemon" to quit'
osascript -e 'tell application "Office365Service" to quit'
rm -R '/Applications/Microsoft Communicator.app/'
rm -R '/Applications/Microsoft Lync.app/'
rm -R '/Applications/Microsoft Messenger.app/'
rm -R '/Applications/Microsoft Office 2011/'
rm -R '/Applications/Remote Desktop Connection.app/'
rm -R '/Library/Application Support/Microsoft/'
@ehnydeel
ehnydeel / sqlDBsize
Last active August 29, 2015 14:01
SQL Script for Database Size
SELECT table_schema "Data Base Name", SUM( data_length + index_length) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema;
@ehnydeel
ehnydeel / nginx-default
Created February 6, 2014 15:24
Nginx Config-Script with phpmyadmin
server {
listen 80;
# <directory> have to be changed
root /var/www/<directory>/public_html;
index index.php index.html index.htm;
# <server_name> have to be changed
server_name <server_name>;
@ehnydeel
ehnydeel / unzip.php
Created February 3, 2014 16:30
PHP-Unzip
<?php
// The unzip script
// This script lists all of the .zip files in a directory
// and allows you to select one to unzip. Unlike CPanel's file
// manager, it _will_ overwrite existing files.
//
// To use this script, FTP or paste this script into a file in the directory
// with the .zip you want to unzip. Then point your web browser at this
// script and choose which file to unzip.