Skip to content

Instantly share code, notes, and snippets.

View CypherpunkSamurai's full-sized avatar
😶
Currently Busy 🌻🐢

Cypherpunk Samurai CypherpunkSamurai

😶
Currently Busy 🌻🐢
View GitHub Profile
@CypherpunkSamurai
CypherpunkSamurai / README.md
Created February 25, 2025 05:53 — forked from matusnovak/README.md
GPG + Git SSH Authentication and Signing on Windows 10

GPG + Git SSH Authentication and Signing on Windows 10

Introduction

This simple Gist will explain how to settup your GPG key to work for SSH authentication (with Git) and Git commit signing on Windows 10. This may seem straightforward on Linux, but there are certain tweaks needed on Windows.

No Cygwin, no MinGW, no Git Bash or any other Linux emulated environment. This works in pure Windows 10.

Software needed

@CypherpunkSamurai
CypherpunkSamurai / TorNoAuth.md
Created February 23, 2025 17:28 — forked from DusanMadar/TorNoAuth.md
A step-by-step guide how to use Tor without Authentication
@CypherpunkSamurai
CypherpunkSamurai / OpenInSciHub.user.js
Created February 23, 2025 07:41 — forked from ifeelagood/OpenInSciHub.user.js
Open In Sci-Hub Userscript
// ==UserScript==
// @name Open In Sci-Hub
// @namespace Violentmonkey Scripts
// @match https://sciencedirect.com/*
// @match https://link.springer.com/article/*
// @match https://ieeexplore.ieee.org/document/*
// @match https://www.sciencedirect.com/science/article/*
// @match https://www.nature.com/articles/*
// @match https://journals.plos.org/plosone/article?id=*
// @match https://academic.oup.com/journals/*
@CypherpunkSamurai
CypherpunkSamurai / SettingupPGPandGit.md
Created February 19, 2025 07:42 — forked from simongle/SettingupPGPandGit.md
A guide for PGP and Git

Setting up PGP with Git

#PGP

If you are reading this, you have taken the first step towards encryption self-righteousness. The steps below are my preferred method for configuration after years of suffering through alternative, more archaic/byzantine steps.

Note, if you already have a PGP key, skip to step #4. Second note: I know UNIX best, so I’m not going to embarrass myself by attempting to write a windows guide. The good people over at EFF have your back: How to: Use PGP for Windows | Surveillance Self-Defense

[A point of clarification: PGP stands for pretty good privacy and is the original underlying protocol, GPG stands for Gnu Privacy Guard, and is an open source program that is compliant with PGP; the two acronyms are often used interchangeably.]

  1. Download your GPG client
@CypherpunkSamurai
CypherpunkSamurai / ipv4_ipv6_doh_doq.md
Created February 18, 2025 20:52 — forked from leiless/ipv4_ipv6_doh_doq.md
List of direct IPv4/IPv6 DoH/DoQ

dns.google / 8888.google

8.8.4.4
8.8.8.8
2001:4860:4860:0:0:0:0:64
2001:4860:4860:0:0:0:0:6464
2001:4860:4860:0:0:0:0:8844
2001:4860:4860:0:0:0:0:8888

Problem

I was training a deep learning model on Google Colab. I had to go somewhere for an emergency work. When I came back, I realized that Colab was disconnected; Therefore, I had to run the whole model again.

Solution

I searched on the Internet to solve this problem. I noticed that Colab will be disconnected if you don't click on the page. Here is an answer that I find:

function ClickConnect() {
  console.log('Working')
 document
@CypherpunkSamurai
CypherpunkSamurai / googleColabHold.js
Created February 10, 2025 06:57 — forked from prrao87/googleColabHold.js
Prevent google colab from disconnecting on chrome (right mouse click -> inspect -> console tab -> insert code)
function ConnectButton(){
console.log("Connect pushed");
document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click()
}
setInterval(ConnectButton,60000);
@CypherpunkSamurai
CypherpunkSamurai / travis-local.md
Created February 8, 2025 04:13 — forked from fulldecent/travis-local.md
Run Travis build locally

travis-local.md

Preconditions:

  1. POSIX or Windows system
  2. Install Docker
  3. A GitHub repo that already builds on Travis

Postcondition:

// from https://stackoverflow.com/questions/10798357/want-to-compile-native-android-binary-i-can-run-in-terminal-on-the-phone
/*
# create tool-chain - one line
# New method in ndk 12.
$NDK/build/tools/make_standalone_toolchain.py --arch arm --install-dir=/tmp/my-android-toolchain
# Old method.
#$NDK/build/tools/make-standalone-toolchain.sh --platform=android-3 --install-dir=/tmp/my-android-toolchain
# add to terminal PATH variable
export PATH=/tmp/my-android-toolchain/bin:$PATH
@CypherpunkSamurai
CypherpunkSamurai / grpo_demo.py
Created January 31, 2025 22:30 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
# Load and prep dataset