Skip to content

Instantly share code, notes, and snippets.

@royosherove
royosherove / PasswordVerifierLegacy.kt
Created July 28, 2022 09:37
Legacy Password Checker
class PasswordVerifierLegacy() {
fun verify(password: String): Any {
var count = 1
var messages:MutableList<String> = mutableListOf()
if (password.length < 8) messages.add("length less than 8")
if (password.firstOrNull { it.isDigit() } == null) messages.add("no digits")
if (password.firstOrNull { !it.isLetterOrDigit() } == null) messages.add("no regular characters")
if (password.filter { it.isLetter() }.firstOrNull { it.isUpperCase() } == null) messages.add("no uppercase")
if (password.filter { it.isLetter() }.firstOrNull { it.isLowerCase() } == null) messages.add("no lowercase")
@royosherove
royosherove / creatures-nft-top-14.txt
Last active September 8, 2021 19:35
LootCreatures grouped by rarity, with bag number
LootCreatures grouped by rarity, with bag number.
Based on 16,000 units at the time of the script.
Created september 8 2021.
Only rarity under 15 is listed.
Refernce:
[Name-Of-Creature]:[HowManyTotal] -> [BagNumbers]
-------------------------------------------------
Giant Vulture of The South:1 -> [27]
Water Lion of The North:1 -> [103]
@royosherove
royosherove / TesterResources.md
Last active December 20, 2020 20:07 — forked from jclarkin/TesterResources.md
List of online resources for Software Testers

Associations & Online Communities

Canada

  • Calgary Software Quality Discussion Group, SQDG - www.sqdg.ca
  • Calgary Perspectives on Software Testing, POST - www.postworkshop.ca
  • Vancouver Software Quality Assurance User Group, VANQ - www.vanq.org
  • Toronto Association of Systems & Software Quality (TASSQ) - www.tassq.org
  • Kitchener Waterloo Software Quality Association (KWSQA) - www.kwsqa.org
@royosherove
royosherove / TransactionScopeRollbackDemo.cs
Created March 28, 2013 22:45
Using TransactionScope to rollback database changes in tests
[TestFixture]
public class TrannsactionScopeTests
{
private TransactionScope trans = null;
[SetUp]
public void SetUp()
{
trans = new TransactionScope(TransactionScopeOption.Required);
}
[TearDown]
Calculator calculator;
[SetUp]
public void Setup()
{
calculator = new Calculator();
}
@royosherove
royosherove / gist:4046346
Created November 9, 2012 15:34
simple angular js to search and display youtube videos
<head >
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script>
<script type="text/javascript">
function PhoneListCtrl($scope, $http){
var dataurl ='http://gdata.youtube.com/feeds/api/videos?q="string%20calculator"%20kata%20-tekpub%20-movie&orderby=rating&alt=json';
$http.get(dataurl).success(function(data){
@royosherove
royosherove / string_calculator_test_unit1.rb
Created October 11, 2012 13:34
simplest string calculator with test_unit and ruby
require "test/unit"
class StringCalculator
NEGATIVES_MSG = "negatives not allowed"
START_OF_CUSTOMDELIM_INDEX = 3
TOO_LARGE = 1001
def add(numbers)
@royosherove
royosherove / string_calculator_spec.rb
Created October 10, 2012 15:29
start of string calculator kata in ruby
require "rspec"
class StringCalculator
def add(numbers)
return 0 if numbers == ""
return numbers.to_i unless numbers.include? ","
return numbers[0].to_i + numbers[2].to_i
end
@royosherove
royosherove / gist:3696673
Created September 11, 2012 07:28
Build your own typemock
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TypeMock.Internal.Hooks;
namespace MyInterceptor
{
public class Class1
{
@royosherove
royosherove / inheritanceclasses.cs
Created September 11, 2012 05:51
class for testing inheritance
using System.IO;
namespace Demos.Inheritance
{
interface ICustomLogger
{
void Write(LogMessage msg);
void SetTarget(string locationOfFileOrService);
void Enable();
void Disable();