Skip to content

Instantly share code, notes, and snippets.

@attacus
attacus / riot-matrix-workshop.md
Last active March 13, 2024 00:16
Create your own encrypted chat server with Riot and Matrix

This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

@bluekvirus
bluekvirus / flask-mysql-redis-celery.md
Last active January 13, 2023 17:25
# Develop a Flask Application using MariaDB, Redis and Celery on Ubuntu 14.04+

Develop a Flask Application using MariaDB, Redis and Celery on Ubuntu 14.04

@credit Yan Zhu (https://github.com/nina-zhu)

Introduction

Before you start this guide, you should run through the "How To Serve Flask Applications with uWSGI and Nginx on Ubuntu 14.04" guide. This is necessary in order to set up virtualenv, uWSGI and Nginx. In that guide, we developed a very simple flask application having just 1 file "firstflask.py" with only 9 lines of code, it is a sample for showing you the general steps. In this guide, we will create a complete user session listing application, with login, logout functionality. We will use MariaDB to store the users records, and use Redis to store the session data and background tasks.

Let's get started.

Set Up the MariaDB Server

@jemc
jemc / docker_rabbitmqctl.md
Last active September 18, 2021 06:07
Controlling Docker RabbitMQ via rabbitmqctl

Example invocation of a RabbitMQ docker container (use -d instead of -t -i to run in the background):

sudo docker run -t -i --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management

Example of controlling the rabbitmq-server inside the container using rabbitmqctl (also inside the container).

sudo docker exec rabbitmq su rabbitmq -- /usr/lib/rabbitmq/bin/rabbitmqctl status
@miku
miku / README.md
Last active July 14, 2022 17:21
git --track vs --set-upstream vs --set-upstream-to

README

Short excursion into git --track, --set-upstream and --set-upstream-to.

All examples use the aliases co for checkout and br for branch.

Setup:

$ git clone git@github.com:AKSW/OntoWiki.git

@cmundi
cmundi / OpenSourceEconomy.ipynb
Last active October 3, 2023 04:38
XKCD-style plots in Julia (using PyPlot,jl to leverage matpolotlib)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiahao
jiahao / setup_julia.sh
Last active January 20, 2022 03:43
Setting up Julia on an Amazon EC2 instance
#Set up data partition
sudo mkdir /data
sudo chmod 777 /data
sudo "echo /dev/xvdb /data ext4 rw,user,exec,comment=cloudconfig 0 2 >> /etc/fstab"
sudo mount /data
#Install build environment
sudo sed -i "s/enabled=0/enabled=1" /etc/yum.repos.d/epel.epo
sudo yum -y update
sudo yum -y upgrade
@hamstar
hamstar / get_time.php
Created April 1, 2012 08:13
Quick and dirty github issue time tracker
<?php
/**
* Ask me http://example.com/get_time.php?issue_id=hamstar-Wikimate-9&key=X7v54j
* Returns time
*/
$API_KEY = "X7v54j";
// TODO precons
@Pablosan
Pablosan / ec2_instance_create_and_setup.sh
Created January 30, 2011 23:37
A bash script that will set up a new EC2 instance and ssh into it.
#!/bin/bash
# Authorize TCP, SSH & ICMP for default Security Group
#ec2-authorize default -P icmp -t -1:-1 -s 0.0.0.0/0
#ec2-authorize default -P tcp -p 22 -s 0.0.0.0/0
# The Static IP Address for this instance:
IP_ADDRESS=$(cat ~/.ec2/ip_address)
# Create new t1.micro instance using ami-cef405a7 (64 bit Ubuntu Server 10.10 Maverick Meerkat)