Skip to content

Instantly share code, notes, and snippets.

View goxofy's full-sized avatar
💭
stay for u.

TinK goxofy

💭
stay for u.
View GitHub Profile
@goxofy
goxofy / test.py
Created April 13, 2024 03:30
test
from pushover_open_client import Client, Message
class Pushover:
def __init__(self):
self.client = Client("creds.json")
def messageCallback(self, msgList):
if msgList:
for msg in msgList:
self.client.deleteMessages(msgList[-1].id)
@goxofy
goxofy / _subconv_selfuse.md
Last active November 16, 2023 08:04
subconv_selfuse.md

subconv for self use

@goxofy
goxofy / debian-install-megacli.md
Created November 8, 2019 02:53 — forked from fxkraus/debian-install-megacli.md
Install LSI MegaCli .deb package on Debian/Ubuntu

download

wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip

unzip

unzip 8-07-14_MegaCLI.zip
@goxofy
goxofy / Pull-and-Sync-Data-Between-Google-Doc-Spreadsheet-and-MySQL.gs
Created June 4, 2019 03:47
You can pull data from MySQL database to Google doc spreadsheet auto with just click of a button or scheduled time. This is great use for retrieving data in spreadsheet format.
// MySQL to Google Spreadsheet By Pradeep Bheron
// Support and contact at pradeepbheron.com
function myMySQLFetchData() {
var conn = Jdbc.getConnection('jdbc:mysql://127.0.0.1:3306/employee_db', 'username', 'pass'); // Change it as per your database credentials
var stmt = conn.createStatement();
var start = new Date(); // Get script starting time
@goxofy
goxofy / tmux-cheatsheet.markdown
Created November 9, 2018 01:21 — forked from ryerh/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

## Backup the current vps 备份当前vps
1. Clean Arch system 清理系统
pacman -Scc
2. Create an excluded file to exclude certain dirs 建立一个需要排除的目录的文件,这些文件不必要备份,新系统会自动生成
cat /root/backup/exclude.txt
/tmp/*
/root/backup/*
/proc
/dev
@goxofy
goxofy / ss_att3.py
Created July 20, 2017 02:28
Shadowsocks attack
#!/usr/bin/env python
#-*- coding: utf-8 -*-
'''
Copyleft (c) 2016 breakwa11
https://github.com/breakwa11/shadowsocks-rss
'''
import logging
import socket
@goxofy
goxofy / nvpproxy.go
Created September 29, 2016 20:55 — forked from jannson/nvpproxy.go
proxy for open.v.p.n
package main
import (
"bufio"
"flag"
"io"
"log"
"net"
"net/http"
"os"

Keybase proof

I hereby claim:

  • I am goxofy on github.
  • I am tink (https://keybase.io/tink) on keybase.
  • I have a public key ASBSEL23CUy6lG9qCv2_jZ3ccsJ5ZsUGgv6LucW2EfrFWwo

To claim this, I am signing this object:

#/bin/bash
server_IP=123.45.67.89
[ -r chnroute.txt ] || curl 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | grep ipv4 | grep CN | awk -F\| '{ printf("%s/%d\n", $4, 32-log($5)/log(2)) }' > chnroute.txt
sudo iptables -t nat -N SHADOWSOCKS
sudo iptables -t nat -A PREROUTING -s 10.8.0.0/24 -p tcp -j SHADOWSOCKS
sudo iptables -t nat -A PREROUTING -s 10.8.0.0/24 -p udp -j SHADOWSOCKS
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE