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
wut = for-each-ref --no-merged refs/remotes/origin/HEAD --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))' |
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
<div class="d-inline-block" style="height:<%= size %>px;width:<%= size %>px;position:relative"> | |
<svg aria-label="<%= value %> / <%= total %>" viewBox="0 0 100 100" height="<%= size %>" width="<%= size %>"> | |
<path fill="var(--color-<%= donut_color %>-muted)" d="<%= self.command(100) %>" /> | |
<% if value_percent > 0 %> | |
<path transform="scale(-1,1) rotate(-90)" transform-origin="50% 50%" fill="var(--color-<%= donut_color %>-emphasis)" d="<%= self.command(self.value_percent) %>" /> | |
<% end %> | |
</svg> | |
<%= render(Primer::Beta::Text.new(position: :absolute, color: color, tag: :p, mb: 0, font_size: font_size, font_weight: :bold, style: "top:50%;left:50%;transform:translate(-50%,-50%)")) do %> | |
<% if total.nonzero? %> | |
<%= value_percent %><%= render(Primer::Beta::Text.new(tag: :span, font_size: 4, font_weight: :bold)) { "%" } %> |
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 server | |
import ( | |
"fmt" | |
"reflect" | |
"go.starlark.net/starlark" | |
) | |
func toValue(v interface{}) starlark.Value { |
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
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"title": "SARIF 2.1.0 for GitHub Code Scanning", | |
"$id": "https://raw.githubusercontent.com/github/turboscan/main/ts/sarif/v2_1_0_turboscan/v2_1_0_turboscan.json", | |
"description": "A schema detailing the sections of the SARIF 2.1.0 specification that are used by GitHub Code Scanning.", | |
"type": "object", | |
"properties": { | |
"$schema": { | |
"description": "The URI of the JSON schema corresponding to the version.", | |
"type": "string", |
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
require "pathspec/gitignorespec" | |
class Codeowners | |
def initialize(codeowners) | |
@captures, @index = codeowners.each_line(chomp: true).map(&:strip).reject { |line| line.empty? || line.start_with?("#") }.map { |line| line.split(/\s+/, 2) }.map do |glob, owners| | |
pattern = ::GitIgnoreSpec.new(glob).instance_variable_get(:@regex) | |
["(#{pattern})", owners.split(/\s+/)] | |
end.reverse.transpose |
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
git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))' |
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
pwgen: main.c | |
gcc -lsodium -o $@ $< |
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 ( | |
"time" | |
"fmt" | |
) | |
func pow(a, b int) int { | |
p := 1 | |
for b > 0 { |
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
const TextCarousel: React.FunctionComponent = ({ children }) => { | |
const [index, setIndex] = React.useState(0); | |
const max = React.Children.count(children); | |
const ms = 5000; | |
React.useEffect( | |
function () { |
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
CREATE OR REPLACE FUNCTION json_merge_objects(a json, b json) RETURNS json | |
LANGUAGE SQL IMMUTABLE AS $$ | |
WITH combined AS ( | |
SELECT pair.key, pair.value FROM json_each(a) AS pair | |
UNION ALL | |
SELECT pair.key, pair.value FROM json_each(b) AS pair | |
) | |
SELECT json_object_agg(key, value) | |
FROM combined | |
$$; |
NewerOlder