sed -i 's|"http://127.0.0.1:9090"|location.origin|' assets/Setup-*.js
This file contains 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
import idaapi | |
import idc | |
import struct | |
KERNEL_START = 0xFFFFFFC008000000 | |
KERNEL_END = 0xFFFFFFC008EF1008 | |
def is_kernel_addr(a): | |
return KERNEL_START <= a <= KERNEL_END |
This file contains 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
import idaapi | |
import re | |
def get_reloc_region(): | |
relocFunc = idaapi.get_name_ea(idaapi.BADADDR, '__relocate_kernel') | |
#nexthead = lambda ea: idaapi.next_head(ea, idaapi.BADADDR) | |
d = idc.GetDisasm(relocFunc) | |
try: | |
relocOff = re.findall(r'LDR *.*?, =(0x[0-9A-F]+)', d)[0] |
This file contains 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
<agent name="中文 Checker"> | |
<icon mdi="text-search-variant" /> | |
<desc>中文语法检查</desc> | |
<model temperature="0.7">gpt-3.5-turbo-16k</model> | |
<def> | |
<render-diff> | |
<join-diff format="html"> | |
<diff unit="char"> <!-- 必须是char,因为word模式没法匹配 --> | |
<source> | |
<input /> |
This file contains 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" | |
"io" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"net/url" | |
"regexp" |
This file contains 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/bash | |
# Change these parameters | |
mntdir=/mnt/cache/_tmp_restic-snapshot | |
dataset_name="cache" | |
datasets=($(zfs list -t filesystem -H | cut -d$'\t' -f1 | grep -E '^'$dataset_name'(/|$)')) | |
echo "Datasets selected: ${datasets[@]}" | |
for d in "${datasets[@]}"; do | |
mntsubdir=${d#"$dataset_name"} |
This file contains 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
// local variable allocation has failed, the output may be wrong! | |
__int64 __fastcall DamageFormula__CalcDamage( | |
DamageInfo **damageInfo, | |
void *damageExporter, | |
Actor *damageTaker, | |
Actor *assistor, | |
HitParamConfig *hitParamConfig, | |
float hurtAddAngle, | |
float damageProportion, | |
char isCritical, |
Turn cocopilot into github enterprise server, so that we can use CoCoPilot without patching Copilot plugin.
- Add the following JS to a cloudflare worker.
- Add Cloudflare Worker Routes:
*cocopilot-gh-enterprise.XXXXXXXX.XXX
. You should also add DNS recordscocopilot-gh-enterprise.XXXXXXXX.XXX
&*.cocopilot-gh-enterprise.XXXXXXXX.XXX
to make the route available - Setting GitHub Enterprise URL to
cocopilot-gh-enterprise.XXXXXXXX.XXX
This file contains 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
// https://op-prod-tr.ozan.com/api/(oauth/token\?grant_type=pre_verification|users/update-mobile-number) | |
const url = $request.url | |
var new_hdrs = {} | |
for (var k in $request.headers) { | |
new_hdrs[k.toLowerCase()] = $request.headers[k] | |
} | |
function main() { | |
if (url == 'https://op-prod-tr.ozan.com/api/oauth/token?grant_type=pre_verification') { | |
if (!($request.body.includes('mfa_code') && $request.body.includes('mfa_token'))) { |
This file contains 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
import io | |
import requests | |
class HTTPFileObj: | |
def __init__(self, url, chunk_size=1024): | |
self.url = url | |
self.chunk_size = chunk_size | |
self.start_byte = 0 # Initialize start_byte here | |
self.buffer = b"" # Initialize buffer to store remaining data | |
self.max_size = -1 |
NewerOlder