Skip to content

Instantly share code, notes, and snippets.

View txomon's full-sized avatar

Javier Domingo Cansino txomon

  • Germany/Koln, UK/London, Spain/Bilbao
View GitHub Profile
@txomon
txomon / sample.c
Last active November 11, 2015 10:23
recvfrom 0.0.0.0
unsigned int get_next_pkt(int fd, struct lx_pkt *pkt, struct sockaddr_in *si)
{
socklen_t size_si = sizeof(struct sockaddr);
ssize_t bytes;
bytes = recvfrom(fd, pkt, 1024, 0, (struct sockaddr *) si, &size_si);
if (bytes < 1) {
return 0;
}
return (unsigned int) bytes;
@txomon
txomon / etc_config_firewall
Last active November 8, 2015 12:30
Trying to sort this out :(
config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
config zone
option name 'lan'
option input 'ACCEPT'
@txomon
txomon / find boot
Last active November 3, 2015 12:49
[root@thorin ~]# find boot/
boot/
boot/bcm2709-rpi-2-b.dtb
boot/bootcode.bin
boot/cmdline.txt
boot/config.txt
boot/fixup_cd.dat
boot/fixup.dat
boot/fixup_db.dat
boot/fixup_x.dat
@txomon
txomon / error.log
Created October 29, 2015 14:41
Openwrt AA compilation
root@3c0f8c6a25c9:/srv/attitude_adjustment# make menuconfig V=s
make[1]: Entering directory `/srv/attitude_adjustment/scripts/config'
zconf.tab.o: In function `zconflex':
zconf.tab.c:(.text+0x21c1): undefined reference to `kconf_id_lookup'
zconf.tab.c:(.text+0x2313): undefined reference to `kconf_id_lookup'
collect2: ld returned 1 exit status
make[1]: *** [conf] Error 1
make[1]: Leaving directory `/srv/attitude_adjustment/scripts/config'
make: *** [scripts/config/mconf] Error 2
@txomon
txomon / error.log
Created October 29, 2015 02:11
Dependency error
make[7]: Entering directory '/home/javier/projects/openwrt/build_dir/target-mipsel_24kec+dsp_musl-1.1.11/ntp-4.2.8p2/util'
CCLD ntp-keygen
OpenWrt-libtool: link: cannot find the library `../sntp/libevent/libevent_core.la' or unhandled argument `../sntp/libevent/libevent_core.la'
make[3]: Entering directory '/home/javier/projects/openwrt/target/linux'
make[4]: Entering directory '/home/javier/projects/openwrt/target/linux/uml'
/home/javier/projects/openwrt/scripts/kconfig.pl + /home/javier/projects/openwrt/target/linux/generic/config-3.18 /home/javier/projects/openwrt/target/linux/uml/config/x86_64 > /home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config.target
awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' /home/javier/projects/openwrt/.config >> /home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config.target
echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> /home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config.target
echo "# CONFIG_KALLSYMS_ALL is not set" >> /home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config.target
echo "# CONFIG_KALLSYMS_UNCOMPRESSED is not set" >> /home/javier
@txomon
txomon / 500.txt
Created September 25, 2015 11:17
Tapquo forums crash
Error: req.flash() requires sessions
at Error (<anonymous>)
at IncomingMessage._flash [as flash] (/var/www/nodebb/node_modules/connect-flash/lib/flash.js:60:41)
at handleErrors (/var/www/nodebb/src/routes/index.js:184:6)
at Layer.handle_error (/var/www/nodebb/node_modules/express/lib/router/layer.js:58:5)
at trim_prefix (/var/www/nodebb/node_modules/express/lib/router/index.js:268:13)
at /var/www/nodebb/node_modules/express/lib/router/index.js:237:9
at Function.proto.process_params (/var/www/nodebb/node_modules/express/lib/router/index.js:312:12)
at /var/www/nodebb/node_modules/express/lib/router/index.js:228:12
at Function.match_layer (/var/www/nodebb/node_modules/express/lib/router/index.js:295:3)
@txomon
txomon / Readme.md
Created September 23, 2015 21:44
Intel's bluescreen

For some reason, I am getting blue screens in a Win7 brand new installation. I know it's related to the Intel driver utility, but not really how.

@txomon
txomon / from-button.xml
Created August 25, 2015 13:46
Start menu not opening
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Microsoft-Windows-Immersive-Shell" Guid="{315A8872-923E-4EA2-9889-33CD4754BF64}" />
<EventID>5961</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>5961</Task>
<Opcode>0</Opcode>
<Keywords>0x4000000000000000</Keywords>
<TimeCreated SystemTime="2015-08-25T13:44:20.873650700Z" />
@txomon
txomon / out.txt
Created August 16, 2015 22:11
Mopidy flake8 execution with flake8-quotes2 installed
% flake8 2>/dev/null
unknown option 'application-import-names' ignored
./tests/test_httpclient.py:10:26: Q100 Single quotes should be used by default: "config,expected"
./tests/test_httpclient.py:32:26: Q100 Single quotes should be used by default: "name,expected"
./tests/mpd/test_tokenizer.py:68:44: Q101 Double quotes should be used to avoid single quote scaping : 'test foo\'bar'
./mopidy/httpclient.py:7:1: Q100 Single quotes should be used by default: "Helpers for configuring HTTP clients used in Mopidy extensions."
./tests/mpd/protocol/test_music_db.py:76:43: Q100 Single quotes should be used by default: "2001"
./tests/mpd/protocol/test_music_db.py:77:43: Q100 Single quotes should be used by default: "2001"
./tests/mpd/protocol/test_music_db.py:87:43: Q100 Single quotes should be used by default: "2001"
./mopidy/m3u/translator.py:86:24: Q101 Double quotes should be used to avoid single quote scaping : 'Couldn\'t open m3u: %s'