Skip to content

Instantly share code, notes, and snippets.

View abserari's full-sized avatar
🐱
Let's build a better world

DingRui Yang abserari

🐱
Let's build a better world
View GitHub Profile
@coffee-mug
coffee-mug / main.go
Created June 4, 2019 06:34
Get all cookies with Golang chromedp
package main
import (
"context"
"fmt"
"log"
"strings"
"github.com/chromedp/cdproto/network"
"github.com/chromedp/chromedp"
@abserari
abserari / MySQL.go
Last active January 11, 2021 13:47
Pub/Sub Pattern realized by SQL database;
package main
import (
"bytes"
stdSQL "database/sql"
"encoding/gob"
"fmt"
"strings"
"time"
@fengyfei
fengyfei / main.go
Created June 23, 2022 10:11
[Go] Sudo execution
package main
import (
"bytes"
"io"
"log"
"os/exec"
"strings"
"sync"
"time"
@ljyloi
ljyloi / test.cu
Last active July 28, 2022 08:41
用来测试 gpu 的简单 cuda 代码
// a program doing matrix multiplication with gpu, which could be use to test if gpu monitor really works
// use nvcc to complile
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <random>
#include <stdexcept>
import qrcode
from qrcode.util import *
def hack_put(self, num, length):
if num == 0:
num = 233 # make a fake length
for i in range(length):
self.put_bit(((num >> (length - i - 1)) & 1) == 1)
qrcode.util.BitBuffer.put = hack_put