Skip to content

Instantly share code, notes, and snippets.

@R3DHULK
R3DHULK / whac-the-mole.rb
Created March 28, 2023 11:02
Whac The Mole Written In Ruby
View whac-the-mole.rb
class WhacAMole
attr_reader :score
def initialize(num_holes)
@num_holes = num_holes
@holes = Array.new(num_holes) { Hole.new }
@score = 0
end
def start
@R3DHULK
R3DHULK / football-game.rb
Created March 28, 2023 10:57
Text Based Football Game In Ruby
View football-game.rb
class Team
attr_accessor :name, :players
def initialize(name)
@name = name
@players = []
end
def add_player(player)
@players << player
@origamiofficial
origamiofficial / Hcaptcha Solver with Browser Trainer(Automatically solves Hcaptcha in browser).user.js
Last active March 28, 2023 10:56
Hcaptcha Solver with Browser Trainer(Automatically solves Hcaptcha in browser) by Md ubeadulla | Note: This script is solely intended for the use of educational purposes only and not to abuse any website. This script uses audio in order to solve the captcha. Use it wisely and do not abuse any website. Click "Raw" to install it on Tampermonkey
View Hcaptcha Solver with Browser Trainer(Automatically solves Hcaptcha in browser).user.js
// ==UserScript==
// @name Hcaptcha Solver with Browser Trainer(Automatically solves Hcaptcha in browser)
// @namespace Hcaptcha Solver
// @version 10.0
// @description Hcaptcha Solver in Browser | Automatically solves Hcaptcha in browser
// @author Md ubeadulla
// @match https://*.hcaptcha.com/*hcaptcha-challenge*
// @match https://*.hcaptcha.com/*checkbox*
// @grant GM_xmlhttpRequest
// @grant GM_setValue
View JetBrains products Activation code until 26 July 2023
33MEHOB8W0-eyJsaWNlbnNlSWQiOiIzM01FSE9COFcwIiwibGljZW5zZWVOYW1lIjoiUG9saXRla25payBNZXJsaW1hdSBNZWxha2EiLCJhc3NpZ25lZU5hbWUiOiJtYWdnaWUgc2VyIiwiYXNzaWduZWVFbWFpbCI6Im1hZ2dpZXNlckB5ZWFoLm5ldCIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiRFBOIiwicGFpZFVwVG8iOiIyMDIzLTA3LTI2IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAyMy0wNy0yNiIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUFMiLCJwYWlkVXBUbyI6IjIwMjMtMDctMjYiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDIzLTA3LTI2IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJSU0MiLCJwYWlkVXBUbyI6IjIwMjMtMDctMjYiLCJleHRlbmRlZCI6dHJ1ZX0seyJjb2RlIjoiR08iLCJwYWlkVXBUbyI6IjIwMjMtMDctMjYiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IkRNIiwicGFpZFVwVG8iOiIyMDIzLTA3LTI2IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJSU0YiLCJwYWlkVXBUbyI6IjIwMjMtMDctMjYiLCJleHRlbmRlZCI6dHJ1ZX0seyJjb2RlIjoiRFMiLCJwYWlkVXBUbyI6IjIwMjMtMDctMjYiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlBDIiwicGFpZFVwVG8iOiIyMDIzLTA3LTI2IiwiZXh0Z
@gaearon
gaearon / 00-README-NEXT-SPA.md
Last active March 28, 2023 10:55
Next.js SPA example with dynamic client-only routing and static hosting
View 00-README-NEXT-SPA.md

Next.js client-only SPA example

Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.

You use Next.js router like normally, but don't define getStaticProps and such. Instead you do client-only fetching with swr, react-query, or similar methods.

You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)

Don't like Next? Here's how to do the same in Gatsby.

@nacyot
nacyot / 2013-03-04-ruby-trivias-you-should-know-4.md
Last active March 28, 2023 10:55
알아두면 도움이 되는 55가지 루비 기법
View 2013-03-04-ruby-trivias-you-should-know-4.md
@Grimthorr
Grimthorr / pending-updates.ps1
Created November 9, 2015 16:03
PowerShell script to list the pending/missing Windows updates.
View pending-updates.ps1
$UpdateSession = New-Object -ComObject Microsoft.Update.Session
$UpdateSearcher = $UpdateSession.CreateupdateSearcher()
$Updates = @($UpdateSearcher.Search("IsHidden=0 and IsInstalled=0").Updates)
$Updates | Select-Object Title
@StevenACoffman
StevenACoffman / fluent-filebeat-comparison.md
Last active March 28, 2023 10:54
Fluentd Fluent-bit FileBeat memory and cpu resources
View fluent-filebeat-comparison.md

Fluent-bit rocks

A short survey of log collection options and why you picked the wrong one. 😜

Who am I? Where am I from?

I'm Steve Coffman and I work at Ithaka. We do JStor (academic journals) and other stuff. How big is it?

Number what it means
101,332,633 unique visitors in 2017
@adamshand
adamshand / sshfp2cf.sh
Last active March 28, 2023 10:52
Automatically Add SSHFP Records to Cloudflare
View sshfp2cf.sh
#!/bin/bash
# Written by Adam Shand <adam@shand.net> 24 Mar 2023
# Inspired by: https://gist.github.com/mikroskeem/8cd3492ce2aa6699c2fa9db3545a58f1#file-setup_sshfp-sh
# TIPS
# - if ssh host and dns zone are the same, prefix ssh server hostname with a dot (eg. .example.nz)
# - set 'StrictHostKeyChecking accept-new' and 'VerifyHostKeyDNS yes' in ~/.ssh/config
# Use global api key or create a restricted token: https://dash.cloudflare.com/profile/api-tokens
@chandrahas24
chandrahas24 / readme.md
Last active March 28, 2023 10:51
function calls in class
View readme.md

function calls in class

Created with <3 with dartpad.dev.