Skip to content

Instantly share code, notes, and snippets.

View emxsys's full-sized avatar

Bruce Schubert emxsys

View GitHub Profile
@boseji
boseji / Rapi-Secure.md
Last active April 6, 2024 19:35
Securing the Raspberry Pi
@emxsys
emxsys / raspberry_pi_script_as_service.md
Last active April 6, 2024 13:46
How to run a python script as a service in Raspberry Pi - Raspbian Jessie

How to Run a Script as a Service in Raspberry Pi - Raspbian Jessie

By: Diego Acuña

Original Article: http://www.diegoacuna.me/how-to-run-a-script-as-a-service-in-raspberry-pi-raspbian-jessie/

A pretty common task when using this device, is to run some script (for example a python script) as a service in the operating system so it can start on boot, stop and restart using systemctl and more. In this post I'm going to explain how to set a little script as a service using Raspbian Jessie in a Raspberry Pi.

Example Python Script

@apolloclark
apolloclark / postgres cheatsheet.md
Last active March 7, 2024 13:53
postgres cheatsheet

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@dantheman213
dantheman213 / export_db_structure.sh
Last active March 5, 2024 02:55
Batch backup and export your Postgres or PostgreSQL table schemas and stored functions or procedures into individual *.sql files --the easy way!
#!/bin/sh
# AUTHOR
# DANIEL E. GILLESPIE (2016)
# https://github.com/dantheman213
# DESCRIPTION
# Export your app's table schemas and stored functions from a PostgreSQL
# database into individual *.sql files for easy management and source control.
@hofmannsven
hofmannsven / README.md
Last active February 2, 2024 20:47
Raspberry Pi Cheatsheet
@emxsys
emxsys / feature_server.md
Last active August 22, 2023 10:56
How to setup a NASA feature server for place names

How to setup a NASA WorldWind feature server (WFS)

Ubuntu 18.04.4 LTS Initial Setup

Change root password

Changing password for root.
(current) UNIX password: 
Enter new UNIX password: 
Retype new UNIX password: 
@emxsys
emxsys / elevation_server.md
Last active August 17, 2023 06:40
How to setup a NASA WorldWind elevation server

How to setup a NASA WorldWind elevation server

Introduction

This guide shows how to create a WMS server on a local VM using Apache, MapServer and elevation data sets curated by NASA. This WMS server serves as a model for a production MapServer instance to be deployed on an a network.

The guide contains a brief overview of how the WorldWind clients make requests, followed by instructions for setting up the Apache web server, MapServer and the Apache caching.

@emxsys
emxsys / webworldwind-example.html
Last active November 1, 2022 22:40
A complete 3D virtual globe example - HTML, JavaScript and CSS - using ESA-NASA Web WorldWind, Bootstrap and KnockoutJS featuring a 3D globe view, 2D map projections, markers and place name finder. Simply download and open this HTML file in your browser to run the app, or see http://worldwind.earth/sample-app.html for a preview and write-up.
<!DOCTYPE html>
<html lang="en">
<!--
A sample framework for the ESA-NASA WebWorldWind web applications.
Author: Bruce Schubert
License: MIT
See: https://worldwind.arc.nasa.gov/web/
-->
<head>
<meta charset="utf-8">
@SamStudio8
SamStudio8 / http-get-dos.conf
Created June 7, 2016 01:43
Simple fail2ban DOS jail
# Fail2Ban configuration file
#
# NOTE
# You should set up in the jail.conf file, the maxretry and findtime carefully in order to avoid false positives.
#
# Author: http://www.go2linux.org
# Modified by: samnicholls.net
# * Mon 6 Jun 2016 - Updated failregex to capture HOST group correctly
[Definition]