Skip to content

Instantly share code, notes, and snippets.

View wilsonsilva's full-sized avatar

Wilson Silva wilsonsilva

View GitHub Profile
@wilsonsilva
wilsonsilva / zeller.rb
Created June 18, 2020 22:47
Zeller's congruence algorithm in Ruby
# day is Numeric
# month is String
# year us Numeric
def zeller(day,month,year)
days = ['Saturday','Sunday','Monday','Tuesday','Wednesday','Thursday','Friday']
case month
when 'January'
library test_framework;
import 'package:unittest/unittest.dart';
// RSpec like framework
typedef Closure();
class Example {
String name;
Closure body;
@wilsonsilva
wilsonsilva / Get Title and URL.applescript
Created May 23, 2023 00:02 — forked from vitorgalvao/Get Title and URL.applescript
AppleScript and JavaScript for Automation to get frontmost tab’s url and title of various browsers
-- AppleScript --
-- This example is meant as a simple starting point to show how to get the information in the simplest available way.
-- Keep in mind that when asking for a `return` after another, only the first one will be output.
-- This method is as good as its JXA counterpart.
-- Chromium variants include "Google Chrome", "Chromium", "Opera", "Vivaldi", "Brave Browser", "Microsoft Edge".
-- Specific editions are valid, including "Google Chrome Canary", "Microsoft Edge Dev".
-- "Google Chrome" Example:
tell application "Google Chrome" to return title of active tab of front window
@wilsonsilva
wilsonsilva / Shop.java
Created July 7, 2023 03:17 — forked from testica/Shop.java
Shop class from StayFree decompile app
package com.burockgames.timeclocker.shop;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.e;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
@wilsonsilva
wilsonsilva / sidekiq_retry_time.csv
Created October 22, 2024 07:26 — forked from marcotc/sidekiq_retry_time.csv
Sidekiq retry exponential backoff formula times
Retry count Retry Time Total Cumulative Time Total Cumulative Days
0 0:00:00 0:00:00 0.0
1 0:00:16 0:00:16 0.0
2 0:00:31 0:00:47 0.0
3 0:01:36 0:02:23 0.0
4 0:04:31 0:06:54 0.0
5 0:10:40 0:17:34 0.0
6 0:21:51 0:39:25 0.0
7 0:40:16 1:19:41 0.1
8 1:08:31 2:28:12 0.1