Skip to content

Instantly share code, notes, and snippets.

@rppowell-lasfs
rppowell-lasfs / lasfslibrary.groovy
Created June 21, 2020 02:40
LASFS Library - groovy script for legacy database using sqlite ormlite
/*
References:
* https://www.baeldung.com/ormlite
* http://ormlite.com/javadoc/ormlite-core/doc-files/ormlite.html
* http://ormlite.com/javadoc/ormlite-core/
*/
@rppowell-lasfs
rppowell-lasfs / APITestExample.java
Last active December 1, 2018 23:45
API Testing Examples using TestNG, RESTAssured, JSONPath, JSONAssert
/* build.gradle
dependencies {
// https://mvnrepository.com/artifact/org.testng/testng
testCompile group: 'org.testng', name: 'testng', version: '6.14.3'
// https://mvnrepository.com/artifact/io.rest-assured/rest-assured
testCompile group: 'io.rest-assured', name: 'rest-assured', version: '3.1.0'
// https://mvnrepository.com/artifact/io.rest-assured/json-schema-validator
testCompile group: 'io.rest-assured', name: 'json-schema-validator', version: '3.1.0'
@rppowell-lasfs
rppowell-lasfs / Hibernate5SqliteProgrammaticConfigurationEmbeddedClassTest.java
Last active May 7, 2018 02:42
Hibernate 5 SQLite Programmatic Configuration with Embedded Class
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.testng.Assert;
import javax.persistence.*;
import java.util.List;
@rppowell-lasfs
rppowell-lasfs / java-hibernate-sqlite.md
Last active March 10, 2024 19:12
Java Hibernate-Sqlite Simple Example 2018-04-22

Java Hibernate/Sqlite Example

Dependencies

// https://mvnrepository.com/artifact/org.hibernate/hibernate-core
compile group: 'org.hibernate', name: 'hibernate-core', version: '5.2.16.Final'

// https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc
compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.21.0.1'
@rppowell-lasfs
rppowell-lasfs / dbf-notes.md
Created April 16, 2018 05:32
Java/Python DBF notes (convention registration database)

DBF notes

Java

javadbf

// https://mvnrepository.com/artifact/com.linuxense/javadbf
@rppowell-lasfs
rppowell-lasfs / Android-TicTacToe-Notes.md
Last active March 23, 2021 14:38
Android Tic Tac Toe Game Notes
@rppowell-lasfs
rppowell-lasfs / tictactoe.py
Created February 23, 2018 21:13
Python Tic-Tac-Toe Game Example
import random
"""
A quick exercise in making a tic-tac-toe game in python 3
"""
class Board:
def __init__(self):
self.newGame()
@rppowell-lasfs
rppowell-lasfs / notes-2018-02-01.md
Last active February 23, 2018 04:55
webapp-builders/market notes 2018-02-01
@rppowell-lasfs
rppowell-lasfs / dbf_dump.py
Created January 23, 2018 06:28
Python script to dumping dbf database files
# -*- coding: utf-8 -*-
"""
This python script is used for dumping dbf database files
* python2.7
"""
@rppowell-lasfs
rppowell-lasfs / youtube-like-dislike.js
Created January 4, 2018 20:20
javascript youtube likes/dislikes
javascript:(function(){
var buttons = document.querySelectorAll('#menu ytd-toggle-button-renderer button.style-scope.yt-icon-button');
var likes = buttons[0].attributes["aria-label"].nodeValue;
var dislikes = buttons[1].attributes["aria-label"].nodeValue;
var regex = /[\d,.]+/;
likes = likes.match(regex);
dislikes = dislikes.match(regex);
alert("Likes: " + likes + "\nDislikes: " + dislikes);
})();