Skip to content

Instantly share code, notes, and snippets.

@cj1324
cj1324 / xively_push.sh
Last active December 19, 2015 15:08
xively.com push port 9494 status
#!/usr/local/bin/bash
if [ ${1}x = "testx" ];then
set -x
fi
PATH=$PATH:/usr/local/bin/
FEEDID="1302940704"
APIKEY="5hlDL4RAdtM0NjSYovKrAJPqD2rY1yKDTQ3vkfvHBimPI9Ku"
@cj1324
cj1324 / openwrt-dnsmasq
Created July 11, 2013 08:59
DNS污染 处理
config dnsmasq
option domainneeded 1
option boguspriv 1
option filterwin2k 0 # enable for dial on demand
option localise_queries 1
option rebind_protection 0 # disable if upstream must serve RFC1918 addresses
option rebind_localhost 1 # enable for RBL checking and similar services
#list rebind_domain example.lan # whitelist RFC1918 responses for domains
option local '/lan/'
option domain 'lan'
@cj1324
cj1324 / GL-iNet
Created October 24, 2013 05:39
GL-iNet OpenWrt Patch base attitude_adjustment, http://www.gl-inet.com/
Index: target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c
===================================================================
--- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c (revision 38494)
+++ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c (working copy)
@@ -21,7 +21,9 @@
#include "dev-wmac.h"
#include "machtypes.h"
-#define TL_WR703N_GPIO_LED_SYSTEM 27
+#define TL_WR703N_GPIO_LED_SYSTEM 13
@cj1324
cj1324 / tilda-1.3.3-mouse-copy-paste.patch
Last active November 1, 2017 05:45
tilda-mouse-quick-copy-paste
diff -Naur tilda-tilda-1.3.3/src/tilda_terminal.c tilda-tilda-1.3.3-patch/src/tilda_terminal.c
--- tilda-tilda-1.3.3/src/tilda_terminal.c|-2016-04-18 20:09:55.000000000 +0800
+++ tilda-tilda-1.3.3-patch/src/tilda_terminal.c|---2017-02-03 17:49:23.293474235 +0800
@@ -48,6 +48,7 @@
#endif
static void window_title_changed_cb (GtkWidget *widget, gpointer data);
static int button_press_cb (GtkWidget *widget, GdkEventButton *event, gpointer data);
+static void selection_changed_cb (GtkWidget *widget, gpointer data);
static gboolean key_press_cb (GtkWidget *widget, GdkEvent *event, tilda_term *terminal);
static void iconify_window_cb (GtkWidget *widget, gpointer data);
@cj1324
cj1324 / vote.py
Created December 9, 2015 09:00
lagou Vote for python2.x
#!/usr/bin/env python2
# encoding: utf-8
from __future__ import (unicode_literals,
print_function)
import time
@cj1324
cj1324 / openvpn-inner-otp.patch
Created October 17, 2023 06:46
Base openvpn 2.4.7
--- a/src/openvpn/misc.c
+++ b/src/openvpn/misc.c
@@ -861,6 +861,62 @@ absolute_pathname(const char *pathname)
}
}
+static int
+b32decode(const char *s, unsigned char *b)
+{
+ int i;
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5vcaGNRYZRKmkHMLuAV6PSN50SZyS6uqt3N4LmesnJjXReetFdJ5wNB94HqYJOrCpsAWnOJYOVcLpZ6EUw1bh/M3+kDFrdOkshD9UdHwlUC6IKePh7zqzcJvDqYAkyOpcSqOZYEfrGzaXmdXkUY5QCk1dNmKH2FdiGMCtu0R9Ksof4PiohzFncFL2IpawtnmIiC1eIRBClRfXO5Ed/zJTVsxgXVRKEPlwEjzQtsFscVerDKLLOe3AEN1JeZBXl2WyYIVo20k6/24qaW1HEV65YuCffJkxDT9itWzo/rfhLSIarHnpjpcdQFN4I8cfgrtzEdXmHbrumJJAnGNOB5R9 cardno:18 607 591