Skip to content

Instantly share code, notes, and snippets.

View felix021's full-sized avatar

Felix021 felix021

View GitHub Profile
@chuangbo
chuangbo / README.md
Last active June 19, 2023 04:48
Python dynamic DNSPod DNS Script

替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。

获取 API Token 的方式

获得 domain_id 可以用 curl

curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`
@tbranyen
tbranyen / string.format.js
Created June 27, 2011 18:22
safer string formatting
// Inspired by http://bit.ly/juSAWl
// Augment String.prototype to allow for easier formatting. This implementation
// doesn't completely destroy any existing String.prototype.format functions,
// and will stringify objects/arrays.
String.prototype.format = function(i, safe, arg) {
function format() {
var str = this, len = arguments.length+1;
// For each {0} {1} {n...} replace with the argument in that position. If
@ShenXuGongZi
ShenXuGongZi / shadowsocksconfig
Created July 30, 2013 12:40
群共享shadowsocks
服务器资源由 www.host700.com 提供 欢迎选购host700 vps
服务器ip:198.35.44.61
服务器端口:8338
服务密码:host700
加密方式:aes-256-cfb"
客户端下载: http://sourceforge.net/projects/shadowsocksgui/files/dist/ #注意里面有win 跟 mac linux的是什么系统就选什么就好了
@rubo77
rubo77 / rotate-screen.sh
Last active October 9, 2023 11:30
This script rotates the screen and touchscreen input, disables or enbles the touchpad, and dis- or enables the virtual keyboard on a Lenovo Yoga 13 or Yoga 2 Pro (source: http://askubuntu.com/q/405628/34298)
#!/bin/bash
# This script rotates the screen and touchscreen input 90 degrees each time it is called,
# also disables the touchpad, and enables the virtual keyboard accordingly
# by Ruben Barkow: https://gist.github.com/rubo77/daa262e0229f6e398766
#### configuration
# find your Touchscreen and Touchpad device with `xinput`
TouchscreenDevice='ELAN Touchscreen'
TouchpadDevice='SynPS/2 Synaptics TouchPad'
@chrisnc
chrisnc / rawudp.go
Last active February 9, 2024 15:29
constructing ip/udp packets in go
package main
import (
"bufio"
"bytes"
"encoding/binary"
"flag"
"fmt"
"net"
"os"
@neuhaus
neuhaus / sign-offline.js
Last active October 16, 2023 23:56
Ethereum: Sign an offline transaction with Node and web3
#!/usr/bin/env node
'use strict';
// ethereum: generate signed transactions
const fs = require('fs-extra');
const rls = require('readline-sync');
const Accounts = require('web3-eth-accounts');
const web3utils = require('web3-utils');
const accounts = new Accounts();