aspe:keyoxide.org:FMTYUMDHOY4EISJ5A7G6PFK7CU
func foo(r io.Reader) error {
data, err := io.ReadAll(r)
if err != nil {
return err
}
_, err = fmt.Print(data)
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name HN AI remover | |
// @version 1 | |
// @grant none | |
// @match https://news.ycombinator.com/ | |
// @match https://news.ycombinator.com/news | |
// @match https://news.ycombinator.com/?p=* | |
// @match https://news.ycombinator.com/news?p=* | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.pitest</groupId> | |
<artifactId>pitest-maven</artifactId> | |
<version>1.4.5</version> | |
<configuration> | |
<avoidCallsTo> | |
<avoidCallsTo>kotlin.jvm.internal.Intrinsics</avoidCallsTo> | |
</avoidCallsTo> | |
<excludedMethods> | |
<excludedMethod>apply</excludedMethod> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# $FreeBSD$ | |
# | |
# PROVIDE: weechat | |
# REQUIRE: NETWORK | |
# KEYWORD: shutdown | |
. /etc/rc.subr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
"net/url" | |
) | |
func request(url_ string) { | |
req, err := http.NewRequest("HEAD", url_, nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@namespace url(http://www.w3.org/1999/xhtml); | |
/* Remove <aside> sidebar and expand content */ | |
@-moz-document domain("blog.cloudflare.com") { | |
aside.sidebar { | |
display: none; | |
} | |
section.primary-content { | |
float: initial; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
An incomplete sample script. | |
This is not a complete bot; rather, it is a template from which simple | |
bots can be made. You can rename it to mybot.py, then edit it in | |
whatever way you want. | |
The following parameters are supported: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
def lp(x, i=None, j=None, cache={}): | |
if i is None or j is None: | |
i = 0 | |
j = len(x)-1 | |
if (i, j) in cache.keys(): | |
return cache[(i, j)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
def LCS_length(X, Y): | |
m = len(X) | |
n = len(Y) | |
c = [[0 for j in range(n+1)] for i in range(m+1)] | |
for i in range(0, m): | |
for j in range(0, n): |
NewerOlder