Skip to content

Instantly share code, notes, and snippets.

@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){
Calculator calculator;
[SetUp]
public void Setup()
{
calculator = new Calculator();
}
@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]
@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 / 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 / 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")