Skip to content

Instantly share code, notes, and snippets.

View maboloshi's full-sized avatar
💭
I may be slow to respond.

沙漠之子 maboloshi

💭
I may be slow to respond.
  • 06:08 (UTC +08:00)
View GitHub Profile
@kartikv11
kartikv11 / github-actions-push-to-protected-branch.yml
Created October 31, 2023 08:28
Github Push Commit in Github Actions to a Protected Branch
...
..
# Use-case here is update version of a Java Application in pom.xml
# You can change the below code as per your need.
# Branch: develop (protected branch)
# User to Push with: has owner/maintain permissions
#
# Variables:
# BUILD_TOKEN : user to commit & push with is set in Github environment Secrets as BUILD_TOKEN
# REPO_NEW_VERSION: is new version value from a previous step (example: 1.0.1)
@opastorello
opastorello / gist:05f02f902339ebc27ea7f20c1838b066
Created November 4, 2021 06:43
Cracking Sublime Text Build (4121)
# Cracking Sublime Text ( Build 4121 ) Tutorial Analysis
---
Two main changes to be made for best experience. This can be done with script.
### License Key
While it is possible to deduce the format of the license key, there is available ones online to show. Analyse and see that it is still that same format. The main part is the verification of the hash values from the license key that we want to always be "correct". This is also the key that this tutorial will use.
```
@brasic
brasic / demo.sh
Last active October 26, 2023 06:58
createCommitOnBranch error example
#!/usr/bin/env sh
set -euo pipefail
# This is an example of intentionally generating an error message from the
# `createCommitOnBranch` mutation by passing an out of date `expectedHeadOid`
# value. Run this inside a git repository configured with a github remote.
# Ensure TOKEN is set to a Personal Access Token with write access to the given
# github repo.
#
# (This script assumes jq is installed for pretty-printing the response JSON)
@symant233
symant233 / ublock-static-filters.txt
Last active March 25, 2024 13:32
uBlock static filters
! 2019/2/2 https://start.duckduckgo.com
start.duckduckgo.com##.header__label.showcase.header--aside__item
start.duckduckgo.com##.tag-home__item
! 2019/2/2 https://www.bilibili.com
www.bilibili.com###fixed_app_download
! 2019/2/4 http://ask.zol.com.cn
ask.zol.com.cn###\#J_recommend_cover
ask.zol.com.cn###\#J_recommend_cover
@swinton
swinton / README.md
Last active March 25, 2024 03:56
Automatically sign your commits from GitHub Actions, using the REST API

Verified commits made easy with GitHub Actions

image

So you want to commit changes generated by a GitHub Actions workflow back to your repo, and have that commit signed automatically?

Here's one way this is possible, using the REST API, the auto-generated GITHUB_TOKEN, and the GitHub CLI, gh, which is pre-installed on GitHub's hosted Actions runners.

You don't have to configure the git client, just add a step like the one below... Be sure to edit FILE_TO_COMMIT and DESTINATION_BRANCH to suit your needs.

@rufoa
rufoa / patch.sh
Last active February 2, 2024 06:41
sublime merge 2 build 2068 linux
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
target="${1:-/opt/sublime_merge/sublime_merge}"
check_sha() {
local sha_valid
printf '\00\00\00' | dd of=sublime_text bs=1 seek=290764 count=3 conv=notrunc
https://www.google.com/search?q=%22EA7E-890007%22
@SteveL-MSFT
SteveL-MSFT / graphql.ps1
Last active October 29, 2023 03:11
GraphQL Query Example
$query = @"
query {
organization(login: "powershell") {
name
url
repository(name: "powershell") {
name
pullRequests(last: 20, states: [OPEN]) {
edges {
node {