Skip to content

Instantly share code, notes, and snippets.

View jchudzynski's full-sized avatar

Janusz Chudzynski jchudzynski

View GitHub Profile
<html>
<head>
<script
src="https://code.jquery.com/jquery-3.6.0.slim.min.js"
integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI="
crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
<script type="module">
import { ethers } from "https://cdn.ethers.io/lib/ethers-5.2.esm.min.js";
// SPDX-License-Identifier: MIT
// Author: Janusz Chudzynski
pragma solidity >=0.4.22 <0.9.0;
contract Faucet {
mapping(address=>uint) lastTransfers;
uint amountToWithdraw = 10 ** 18 * 0.01;
function requestTokens(address payable requestor) external {
@jchudzynski
jchudzynski / Faucet.sol
Created February 14, 2022 04:35
Faucet
// SPDX-License-Identifier: MIT
// Author: Janusz Chudzynski
pragma solidity >=0.4.22 <0.9.0;
contract Faucet {
mapping(address=>uint) lastTransfers;
uint maxAllowed = 10 ** 18 * 5000;
constructor() {
@jchudzynski
jchudzynski / map.html
Last active June 8, 2017 15:24
Script that displays various information related to summer internships
<script>
"use strict";
</script>
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script src="https://use.fontawesome.com/da66ce1fd6.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rsvp/3.5.0/rsvp.js"></script>
<script src="https://www.gstatic.com/firebasejs/3.8.0/firebase.js"></script>
<script src="http://atcwebapp.argo.uwf.edu/summerinterns/web/scripts/fire_script.php"></script>
<script src="http://atcwebapp.argo.uwf.edu/summerinterns/web/scripts/si_script.php"></script>
@jchudzynski
jchudzynski / students.csv
Last active October 29, 2015 15:28
Bulk Import of Students
@jchudzynski
jchudzynski / RemoveNTh.swift
Created April 30, 2015 21:22
LeetCode Remove nth element from the end from linked list in Swift.
class ListNode{
var val:Int?
var next:ListNode?
init(){}
init(x:Int){
self.val = x
}
}
@jchudzynski
jchudzynski / TwitterDateFormatter
Created April 14, 2015 16:25
Parses twitter date and outputs a string in new format
// Playground - noun: a place where people can play
import UIKit
func parseTwitterDate(twitterDate:String, outputDateFormat:String)->String?{
let formatter = NSDateFormatter()
formatter.dateFormat = "EEE MMM dd HH:mm:ss Z yyyy"
@jchudzynski
jchudzynski / Monkey
Created April 3, 2014 20:01
Stress Testing application using monkey tool
jmc72$ ./adb shell monkey -p com.example.testingandroid -v 500
:Monkey: seed=1397651478340 count=500
:AllowPackage: com.example.testingandroid
:IncludeCategory: android.intent.category.LAUNCHER
:IncludeCategory: android.intent.category.MONKEY
// Event percentages:
// 0: 15.0%
// 1: 10.0%
// 2: 2.0%
// 3: 15.0%
package com.itenwired.itenconference.model;
import android.util.Log;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Created by blcooley on 9/10/13.
@jchudzynski
jchudzynski / TableViewExample.m
Created February 4, 2014 21:06
Example of complete View Contr
// AlbumListData.m
// Created by Janusz Chudzynski on 3/25/13
#import "AlbumListData.h"
#import "Album.h"
@interface AlbumListData()<UITableViewDelegate, UITableViewDataSource>
@property (nonatomic,weak) UITableView * tableView;
@property (nonatomic,strong) NSArray * objects;