Skip to content

Instantly share code, notes, and snippets.

View coyove's full-sized avatar
👩‍🎨
Test

Coyove coyove

👩‍🎨
Test
View GitHub Profile
@coyove
coyove / init.el
Last active September 25, 2020 00:39
(fset 'yes-or-no-p 'y-or-n-p)
(add-to-list 'default-frame-alist '(fullscreen . maximized))
(defun set-exec-path-from-shell-PATH ()
(tool-bar-mode 0)
;; (load-theme 'leuven t)
(load-theme 'monokai t)
(if (eq system-type 'windows-nt)
(progn
(set-face-attribute 'default nil :height 140)
type str struct {
p unsafe.Pointer
a int
}
func mstr(s string) str {
ss := *(*[2]uintptr)(unsafe.Pointer(&s))
fmt.Println(ss)
return str{
p: unsafe.Pointer(ss[0]),
// Copyright 2015-2019 Brett Vickers.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package etree provides XML services through an Element Tree
// abstraction.
package xmlwrap
import (
"bytes"
package main
import (
_ "image/png"
"log"
"net/http"
"strconv"
)
type nodeManager struct {
@coyove
coyove / .vimrc
Last active September 18, 2023 10:49
set nocompatible " be iMproved, required
set enc=utf-8
set tenc=utf-8
set fenc=utf-8
set fencs=utf-8,usc-bom
set cursorline
set autoindent
set backspace=indent,eol,start
set number
set incsearch
package main
import (
"bufio"
"encoding/binary"
"io"
"io/ioutil"
"log"
"os/exec"
)
package main
import (
"io/ioutil"
"log"
"runtime"
"sort"
"strings"
"time"
)
#include <stdint.h>
#include <stdio.h>
int first_zero(uint64_t v)
{
if (v == 0xffffffffffffffffl) return -1;
int bits = 64;
uint8_t h;
func uploadWeibo(fn string) ([]byte, error) {
file, err := os.Open(fn)
if err != nil {
return nil, err
}
defer file.Close()
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
package main
import (
"flag"
"fmt"
"github.com/PuerkitoBio/goquery"
"io"
"net/http"
"os"
"path/filepath"