Skip to content

Instantly share code, notes, and snippets.

View willpatera's full-sized avatar

Will willpatera

View GitHub Profile
@nathakits
nathakits / README.md
Last active August 25, 2023 17:59
Creating a `.desktop` file in Ubuntu that launches a Python script

Creating a .desktop file in Ubuntu that launches a Python script

Here we will make two .desktop files that will launch Pupil Capture and Pupil Player.

Steps

  1. Right click on your desktop and create a new empty document.
  2. Set the document file type by Renaming the document that ends with .desktop
  3. Drag the document into a text editor and edit the document with the example code below

Note: Change the X-Icon-Path to the icon you want to use and Execpath to where Pupil Capturemain.py` is located on your machine (see example pupil.desktop for reference)

import json
import os
from bravado_core.spec import Spec
from bravado_core.validate import validate_object
from yaml import load, Loader, dump, Dumper
def validate_car(car):
validate_object(spec, Car, car)
import json
import os
import syslog
import validator
from flask import Flask, request, make_response
from jsonschema.exceptions import ValidationError
class BadRequestError(Exception):
""" Signals a malformed request body
@guycalledseven
guycalledseven / tplink_ue300_driver_uninstall.sh
Last active May 31, 2020 14:53
Manually uninstall TPLINK UE300 USB3 WIFI dongle drivers on OS X
@andyshinn
andyshinn / Dockerfile
Created December 24, 2015 19:07
BusyBox cron container example
FROM gliderlabs/alpine:3.3
COPY myawesomescript /bin/myawesomescript
COPY root /var/spool/cron/crontabs/root
RUN chmod +x /bin/myawesomescript
CMD crond -l 2 -f
@oshliaer
oshliaer / .en.md
Last active September 30, 2020 02:33
Create a Gmail draft with attachments via Google Apps Script #gas #gmail