Skip to content

Instantly share code, notes, and snippets.

@m-jowett
m-jowett / log.md
Last active January 3, 2023 07:53
Setup LibreOffice Online (Log/Guide) [WIP]

Setup LibreOffice Online (Log/Guide) [WIP]

About

This guide/log is based off my experience attempting to build and install LibreOffice Online and it's dependencies on my system.

The end goal is to get LibreOffice Online integrated with Karoshi Server.

LibreOffice Online is still in development (17/06/16).

@p-baleine
p-baleine / LSTM PTB(small).ipynb
Last active May 16, 2023 12:28
Tensorflow's PTB LSTM model for keras
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active January 9, 2025 12:22
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@mmmeri
mmmeri / recv.py
Created January 18, 2016 15:49
ZMQ audio stream sender
import numpy as np
import zmq
context = zmq.Context()
sock = context.socket(zmq.SUB)
print "connect"
sock.setsockopt(zmq.SUBSCRIBE, '7578128')
sock.connect("tcp://127.0.0.1:5557")
@Arlen22
Arlen22 / Hosting multiple tiddlywikis on Express.md
Last active May 21, 2021 13:08 — forked from anonymous/index.js
A file to allow running multiple TiddlyWikis as seperate folders of an Express JS application. Made with 5.1.9. Amended for 5.1.14-Prerelease. My part is released into the Public Domain.
  • Download the NodeJS version of TiddlyWiki from GitHub or NPM. If you use NPM, do not use the global option (-g).
  • Put web.js beside tiddlywiki.js.
  • Require web.js from the Express application and call it on every matching request (see below).
  • For TiddlyWiki before 5.1.14-Prerelease: In core/modules/commands/server.js, seperate out the requestHandler function that is passed to http.createServer so it is on the SimpleServer prototype. Add the self variable to the first line of the requestHandler as shown.
SimpleServer.prototype.listen = function(port,host) {
	http.createServer(this.requestHandler.bind(this)).listen(port,host);
};
SimpleServer.prototype.requestHandler = function(request,response) {
@mortn
mortn / ddns.service
Last active April 9, 2019 04:46
DDNS/DynDNS/Dynamic DNS update systemd service
[Unit]
Description=DynDNS Updater services
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
EnvironmentFile=/etc/dyndns.conf
ExecStart=/usr/bin/wget -qO /tmp/dyndns.out '$DDNSURL'
@davoclavo
davoclavo / spacemacs-cheatsheet.md
Last active October 26, 2024 19:46 — forked from 526avijitgupta/spacemacs-cheatsheet.md
Spacemacs cheatsheet

emacs --daemon to run in the background. emacsclient.emacs24 <filename/dirname> to open in terminal

NOTE: "M-m and SPC can be used interchangeably".

  • Undo - C-/
  • Redo - C-?
  • Change case: 1. Camel Case : M-c 2. Upper Case : M-u
  1. Lower Case : M-l
@shubhadeep
shubhadeep / webdavclient.py
Created September 18, 2015 17:53
Python WebDAV Client
import os, sys, requests
from lxml import objectify, etree
WEBDAV_STATUS_CODE = { # See http://tools.ietf.org/html/rfc4918
'OK' : 200,
'CREATED' : 201,
'NO_CONTENT' : 204,
'MULTI_STATUS' : 207,
'NOT_FOUND' : 404,
'METHOD_NOT_ALLOWED' : 405,
@martinth
martinth / argparse_fileinput_demo.py
Created August 6, 2015 11:04
Read from stdin or files in Python (combining argparse and fileinput)
import argpase
import fileinput
if __name__ == '__main__':
parser = ArgumentParser()
parser.add_argument('--dummy', help='dummy argument')
parser.add_argument('files', metavar='FILE', nargs='*', help='files to read, if empty, stdin is used')
args = parser.parse_args()
# If you would call fileinput.input() without files it would try to process all arguments.
@kshiteesh
kshiteesh / urlsafari
Last active January 16, 2025 02:37
This AppleScript saves all the tabs open in all Safari windows to a Markdown file.
(*
Export All Safari Tabs in All Open Windows to a Markdown File
July 13, 2015
// SCRIPT PAGE
http://hegde.me/urlsafari
// ORIGINAL SCRIPT ON WHICH THIS SCRIPT IS BUILT
http://veritrope.com/code/export-all-safari-tabs-to-a-text-file