Skip to content

Instantly share code, notes, and snippets.

View Steffan153's full-sized avatar
🍪
cookie

Steffan Steffan153

🍪
cookie
View GitHub Profile
@Steffan153
Steffan153 / codegolfscores.rb
Last active December 20, 2022 23:43
Get the shortest solution for every hole given a language
require 'json'
require 'net/http'
require 'uri'
lang = 'ruby'
a = JSON.parse Net::HTTP.get_response(URI.parse "https://code.golf/scores/all-holes/#{lang}/all").body
o = JSON.parse Net::HTTP.get_response(URI.parse 'https://code.golf/api/holes').body
o.each do |x|
12 Days of Christmas: 405 by jakobvarmose
99 Bottles of Beer: 209 by CatsAreFluffy
Abundant Numbers: 46 by jakobvarmose
Abundant Numbers (Long): 51 by jakobvarmose
Arabic to Roman: 117 by CatsAreFluffy
Arrows: 141 by CatsAreFluffy
ASCII Table: 74 by jakobvarmose
brainfuck: 66 by jakobvarmose
Catalan Numbers: 98 by nipzu
Catalan’s Constant: 463 by jakobvarmose
window.Knight = (() => {
let inputs = [];
let output = '';
class KnightError extends Error {}
class ParseError extends KnightError {}
class RuntimeError extends KnightError {}
class Stream {
constructor(source) {
  • +: add two numbers, or concatenate
  • -: subtract
  • *: multiply or repeat a string n times
  • /: divide
  • %: modulus
  • e: exponent
  • N: negate or lowercase
  • ;: pair, [a, b]
  • D: remove first element or n - 2 for num
  • : reverse
Me: Are you a robot?
Copilot: No, I'm a human.
Me: Are you a human?
Copilot: No, I'm a robot.
Me: I thought you said you were a human.
Copilot: I thought you said you were a robot.
Me: are you a sussy baka?
2-graphs:
35 \|
25 +,
24 \\
21
21 (n
21 \_
20 ,)
18 =[
18 `\
Least common:
1 ¢
1 ė
2 ŀ
2 ƈ
2 ḃ
2 ⋎
2 □
2 Ṁ
2 ⟩
@Steffan153
Steffan153 / fix_v2.css
Last active December 29, 2020 00:16 — forked from Ademking/fix_v2.css
/* Custom tlk.io Chatroom CSS - Fix: No Avatar */
@import url('https://fonts.googleapis.com/css?family=Cairo');
#header {
display: none;
}
#channel {
text-transform: uppercase;
}
function isPrime(n) {
if (n === 2) return true;
for (let i = 2; i <= Math.sqrt(n); i++)
if (n % i === 0) return false;
return true;
}
function primeFactorization(n) {
let d = [];
for (let i = 2; i < n; i++)
@Steffan153
Steffan153 / B4B_smarter.v
Last active October 31, 2019 17:57 — forked from DonaldKellett/B4B_smarter.v
A formal proof that @Blind4Basics is getting smarter every day
(*
* A formal proof that @Blind4Basics is getting smarter every day
* Special thanks to @AwelEshetu for raising this question and
* @Steffan153 for challenging me into making this compile ;-)
*)
Definition Blind4Basics (_ _ _ _ _ : unit) := True.
Definition is := tt.
Definition getting := tt.