Skip to content

Instantly share code, notes, and snippets.

View fcicq's full-sized avatar

fcicq fcicq

View GitHub Profile
--- a/src/acpi.c 2013-01-19 06:44:54.000000000 +0600
+++ b/src/acpi.c 2013-05-07 01:16:30.000000000 +0600
@@ -214,6 +214,11 @@
#include "acpi-dsdt.hex"
+#define CONFIG_OEM_SLIC
+#ifdef CONFIG_OEM_SLIC
+#include "acpi-slic.hex"
+#endif
diff --git a/src/fw/acpi.c b/src/fw/acpi.c
index 042d571..741a3cb 100644
--- a/src/fw/acpi.c
+++ b/src/fw/acpi.c
@@ -25,6 +25,11 @@
u32 acpi_pm1a_cnt VARFSEG;
+#define CONFIG_OEM_SLIC
+#ifdef CONFIG_OEM_SLIC
@fcicq
fcicq / supervisor-3.0-solaris.patch
Last active August 29, 2015 13:58
supervisor for solaris, Note: the correct path is /opt/local/lib/python2.7/site-packages/supervisor
--- options.py 2013-06-20 17:00:12.000000000 +0000
+++ options.py 2014-04-04 03:42:52.787860756 +0000
@@ -1028,6 +1028,7 @@
self.stderr = sys.stderr = sys.__stderr__ = open("/dev/null", "w")
os.setsid()
os.umask(self.umask)
+ signal.signal(signal.SIGHUP, signal.SIG_IGN)
# XXX Stevens, in his Advanced Unix book, section 13.3 (page
# 417) recommends calling umask(0) and closing unused
# file descriptors. In his Network Programming book, he
@fcicq
fcicq / fabfile.py
Created April 11, 2014 01:54
push ssh pub key in fabric
import os
from fabric.api import task, run
from fabric.contrib.files import append, contains
try:
import hosts # include host settings for fabric
except ImportError:
print('Warning: No Hosts file found, continuing')
def read_key_file(key_file):
#!/usr/bin/env python
import pcap
TYPE_DISCOVERY = '\x88\x63'
TYPE_SESSION = '\x88\x64'
PADI = '\x09'
PADO = '\x07'
PADR = '\x19'
@fcicq
fcicq / gist:9c45368ef59c2e7d63e6
Created May 8, 2014 19:09
compcache for ubuntu
sudo apt-get install zram-config
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' ios_binary
ldid -s ios_binary
@fcicq
fcicq / gist:c30352e48b44c8dd7f9d
Last active August 29, 2015 14:04
fix rtl8723ae, rtl8192cu
echo "options rtl8723ae ips=0 fwlps=0" | sudo tee /etc/modprobe.d/rtl8723ae.conf
echo "options 8192cu rtw_power_mgnt=0 rtw_enusbss=0" | sudo tee /etc/modprobe.d/8192cu.conf
@fcicq
fcicq / autossh
Created July 25, 2014 23:05
autossh config for openwrt, the point is "--"
config autossh
option ssh '-i /PATH/TO/PRIVKEY -N -T -R REMOTEPORT:127.0.0.1:22 -- -y -l USERNAME -p PORT HOST'
option gatetime '0'
option monitorport 'MONITORPORT'
option poll '600'