Skip to content

Instantly share code, notes, and snippets.

View geektheripper's full-sized avatar
💭
ready to die

GeekTR geektheripper

💭
ready to die
View GitHub Profile
@geektheripper
geektheripper / index.md
Created November 1, 2022 15:35
Plan for CID.place extension

1. Overview:

First of all, we will implement all the features mentioned in this page. We plan to build such a front-end project:

  • It's a pure SPA front-end project and optimized to use relative paths, so it can be easily deployed to IPFS or AWS S3.
  • We will add some sharing features, when you search a CID, it will jump to url containing ?cid=<cid>, so it can be shared to others. And we also add multiple sharing methods: "Copy Link" Button, Shield.io Badges and embedded web card.

[![FilGreen-bafybeifx7yeb55armcsxwwitkymga5xf53dxiarykms3ygqic223w5sk3m](https://img.shields.io/badge/FilGreen-bafybeifx7yeb55armcsxwwitkymga5xf53dxiarykms3ygqic223w5sk3m-104000?style=flat-square&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIGlkPSJMYXllcl8xIiB4PSIwIiB5PSIwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0MCA0MCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgNDAgNDAiPjxzdHlsZT4uc3Qxe2ZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO2ZpbGw6I2ZmZn08L3N0eWxlPjxkZ

@geektheripper
geektheripper / Dockefile
Created September 27, 2022 13:45
Dockefile example
# syntax=docker/dockerfile:1
FROM eclipse-temurin:11-jdk-jammy as builder
WORKDIR /app
COPY .mvn/ .mvn
COPY mvnw pom.xml ./
RUN --mount=type=cache,target=/root/.m2/,id=mvn_cache,sharing=locked \
./mvnw dependency:resolve --no-transfer-progress --settings /app/.mvn/wrapper/settings.xml
@geektheripper
geektheripper / ddns.ros.sh
Created April 27, 2021 13:26
阿里云函数计算DDNS
:global DDns do={
:local DDnsDomain "$DDnsSubDomain.<your-domain>";
:local DDnsApiURL "https://<account-id>.<region>.fc.aliyuncs.com/2016-08-15/proxy/<your-service>/<your-function>/<your-secert-key>";
:local OldIP [/ip dns static get [find name="$DDnsDomain"] address];
:local NewIPTemp [/ip address get [find interface="$DDnsInterface"] address];
:local NewIP [:pick $NewIPTemp 0 ([:len $NewIPTemp]-3)];
:if ($NewIP != $OldIP) do={
:log info "interface $DDnsInterface ip address $OldIP changed to $NewIP";
/ip dns static set [find name="$DDnsDomain"] address=$NewIP
# /etc/nginx/conf.d/beyourminds.com.conf
server {
listen 80;
server_name beyourminds.com;
return 301 https://$host$request_uri;
}
server {

Keybase proof

I hereby claim:

  • I am geektheripper on github.
  • I am geektr (https://keybase.io/geektr) on keybase.
  • I have a public key ASDmEeBZK8wKax2UWDm6I-RmCxarYxtmil2-Zzbc8_FqUQo

To claim this, I am signing this object:

@geektheripper
geektheripper / matryoshka.sh
Created March 27, 2021 15:03
套娃 ssh 转发,转发私钥登录的 ssh 为密码登录
#!/usr/bin/env bash
SP_USER=geektr
SP_PORT=2222
# in docker:
# create user and echo it's password
if [[ "$IN_DOCKER" == "true" ]]; then
SP_PASSWD="$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1)"
echo "=================="
@geektheripper
geektheripper / majsoul.js
Created January 15, 2021 13:05
雀魂氪金计算器
var blessed = require("blessed"),
contrib = require("blessed-contrib"),
screen = blessed.screen({ fullUnicode: true });
function chouka(charReq, stuffReq) {
let char = new Set();
let stuff = new Set();
let count = 0;
const isEnd = () =>
@geektheripper
geektheripper / send-qzh.js
Last active August 24, 2020 07:24
傻月月直播间定时发千纸鹤脚本
const token = document.cookie.match(/bili_jct=(.+?);/)[1];
const uid = document.cookie.match(/DedeUserID=(.+?);/)[1];
const sendQzh = async () =>
await (
await fetch("https://api.live.bilibili.com/gift/v2/Live/send", {
headers: { "content-type": "application/x-www-form-urlencoded" },
referrer: "https://live.bilibili.com/4767523",
referrerPolicy: "no-referrer-when-downgrade",
body: `uid=${uid}&gift_id=30666&ruid=128912828&send_ruid=0&gift_num=1&coin_type=gold&bag_id=0&platform=pc&biz_code=live&biz_id=4767523&rnd=1598195851&storm_beat_id=0&metadata=&price=0&csrf_token=${token}&csrf=${token}&visit_id=`,
# Wrap regsvr32
Function Register-Dll ([string[]]$Files) {
if([System.Environment]::Is64BitOperatingSystem) {
$regsvr = [System.Environment]::ExpandEnvironmentVariables('%windir%\SysWOW64\regsvr32.exe')
} else {
$regsvr = [System.Environment]::ExpandEnvironmentVariables('%windir%\System32\regsvr32.exe')
}
foreach($File in $Files) {
if (Test-Path $File -PathType Leaf) {
@geektheripper
geektheripper / nps.conf
Last active July 30, 2019 03:55
Nps Ansible 部署代码
# roles/nps_server/templates/nps.conf
appname={{ nps_appname }}
runmode={{ nps_runmode }}
http_proxy_ip={{ nps_http_proxy_ip }}
http_proxy_port={{ nps_http_proxy_port }}
https_proxy_port={{ nps_https_proxy_port }}
https_just_proxy={{ nps_https_just_proxy }}
https_default_cert_file={{ nps_https_default_cert_file }}
https_default_key_file={{ nps_https_default_key_file }}