Skip to content

Instantly share code, notes, and snippets.

@DestinyOne
DestinyOne / Instruction.md
Last active April 4, 2024 18:56
Letting ubuntu bash on Windows 10 run 'ssh -X' to get a GUI environment in a remote server

Letting Ubuntu bash on Windows 10 run 'ssh -X' to get a GUI environment on a remote server

  • First

Install all the following. On Window, install Xming. On Ubuntu bash, use sudo apt install to install ssh xauth xorg.

sudo apt install ssh xauth xorg
@Manu343726
Manu343726 / gist:ca0ceb224ea789415387
Created September 19, 2015 18:15
Running ARM docker image with QEMU on x86_64 Arch Linux host
# Install quemu, docker, etc
yaourt -S qemu qemu-user-static binfmt-support
# The quemu-user-static AUR package is outdated and broken. The .deb package they pull is no longer in the ubuntu repository.
# Edit the PKGBUILD and use qemu-user-static_2.4+dfsg-3_amd64.deb (With SHA1 sum "84d83a16c60c82b6c579f2f750b04a3ac26c249b")
# Enable ARM emulation
update-binfmts --enable qemu-arm
@pgjones
pgjones / app.py
Last active January 15, 2020 15:00
flask-sockets example requires: Flask, Flask-Sockets, Flask-SocketIO
from geventwebsocket.handler import WebSocketHandler
from gevent.pywsgi import WSGIServer
from flask import Flask, request, render_template_string
from flask_sockets import Sockets
import json
app = Flask(__name__)
sockets = Sockets(app)
template = """
@leplatrem
leplatrem / yourapp
Last active September 24, 2023 23:01
gunicorn virtualenv init.d script (could be simpler with upstart)
#! /bin/bash
### BEGIN INIT INFO
# Provides: yourapp
# Required-Start: nginx
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: The main django process
# Description: The gunicorn process that receives HTTP requests
# from nginx
@simonlynen
simonlynen / detect_arm_cmake
Created May 8, 2013 12:27
detect arm cmake
IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
add_definitions (-mfloat-abi=softfp -mfpu=neon)
ELSE(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
ENDIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
@rbialek
rbialek / config
Created June 7, 2011 13:32
ssh/.config
Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile /home/user/.ssh/id_rsa