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
| <!DOCTYPE html> | |
| <style> | |
| ul li { | |
| display: block; | |
| height: 50px; | |
| width: 50px; | |
| } | |
| </style> | |
| <table> | |
| <tr> |
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
| func Search[V any](s any) iter.Seq[reflect.Value] { | |
| v := reflect.ValueOf(s) | |
| t := reflect.TypeFor[V]() | |
| for v.Kind() == reflect.Ptr { | |
| v = reflect.Indirect(v) | |
| } | |
| if v.Kind() == reflect.Struct { | |
| return doSearch(v, t) | |
| } | |
| return func(yield func(reflect.Value) bool) { |
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 { |
NewerOlder