Skip to content

Instantly share code, notes, and snippets.

View domgiles's full-sized avatar

Dominic Giles domgiles

View GitHub Profile
@domgiles
domgiles / OLED_merge.cpp
Created January 31, 2014 19:45
Support for Adafruit_CharacterOLED on the Spark Core. Merge of existing cpp and headers.
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
// OLED hardware versions
#define OLED_V1 0x01
#define OLED_V2 0x02
// commands
#define LCD_CLEARDISPLAY 0x01
-- Author : Dominic Giles
-- Date : 21/7/2016
-- File : utilities_module.sql
-- Description : Relational ORDS module definitions and test data for ORDS Demo
-- Run As : This script should be run by the app user. soe in this example
begin
ORDS.enable_schema(
p_enabled => TRUE,
{
"table_name" :"product_information",
"column_value": "3",
"user_id":"dominic.giles"
}
curl -i -H "Content-Type: application/json" -X POST --data "@test.json" http://oracle12c2:8080/ords/soe/utilities/like
curl -X GET "http://oracle12c2:8080/ords/soe/utilities/getlikes?table_name=product_information&column_value=2&user_id=dominic.giles"
<!--Author : Dominic Giles-->
<!--Date : 21/7/2016-->
<!--File : products.html-->
<!--Description : HTML to display simple table-->
<!--Javascript Libraries : JQuery, JQuery UI, DataTable-->
<!--CSS Files : BootStrap, Font-Awesome-->
<!DOCTYPE html>
<html lang="en">
<head>
// Author : Dominic Giles
// Date : 21/7/2016
// File : liketable.js
// Description : Javascript to enable rows to be liked in a given table
// Note : DataTable paging is excluded for brevity
// Javascript Libraries : JQuery, JQuery UI, BootStrap, DataTable
$(document).ready(function () {
var $userName = 'dominic.giles';
import json
import requests
url = 'http://tpc12server:8080/ords/soe/soda/latest/OrdersCollection'
# Delete Collection
response = requests.delete(url)
# Create Collection
response = requests.put(url)
from matplotlib import style
import pandas as pd
from matplotlib import dates
import matplotlib.pyplot as plt
timings = pd.Series(['2016-12-25 08:10:00', '2016-12-25 08:30:00', '2016-12-25 08:50:00', '2016-12-25 08:58:00',
'2016-12-25 09:08:00', '2016-12-25 09:14:00', '2016-12-25 09:20:00', '2016-12-25 09:26:00',
'2016-12-25 09:35:00', '2016-12-25 09:46:00', '2016-12-25 09:55:00', '2016-12-25 10:05:00',
'2016-12-25 10:15:00', '2016-12-25 10:30:00', '2016-12-25 10:55:00', '2016-12-25 11:10:00',
'2016-12-25 11:30:00', '2016-12-25 11:54:00', '2016-12-25 12:15:00'])
@domgiles
domgiles / ChangeRedoSize.py
Last active August 26, 2018 07:28
Simple "Oracle Database" hack in python to change the size of the redo logs files. It assumes that Oracle Managed Files are being used.
import argparse
import time
import cx_Oracle
from prettytable import PrettyTable
class RedoLogManager():
def get_log_files_info(self, cursor):