Skip to content

Instantly share code, notes, and snippets.

@cj1324
cj1324 / vote.py
Created Dec 9, 2015
lagou Vote for python2.x
View vote.py
#!/usr/bin/env python2
# encoding: utf-8
from __future__ import (unicode_literals,
print_function)
import time
@cj1324
cj1324 / tilda-1.3.3-mouse-copy-paste.patch
Last active Nov 1, 2017
tilda-mouse-quick-copy-paste
View tilda-1.3.3-mouse-copy-paste.patch
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 / GL-iNet
Created Oct 24, 2013
GL-iNet OpenWrt Patch base attitude_adjustment, http://www.gl-inet.com/
View GL-iNet
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
View openwrt-dnsmasq
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 / xively_push.sh
Last active Dec 19, 2015
xively.com push port 9494 status
View xively_push.sh
#!/usr/local/bin/bash
if [ ${1}x = "testx" ];then
set -x
fi
PATH=$PATH:/usr/local/bin/
FEEDID="1302940704"
APIKEY="5hlDL4RAdtM0NjSYovKrAJPqD2rY1yKDTQ3vkfvHBimPI9Ku"