Skip to content

Instantly share code, notes, and snippets.

--- a/mcabber/mcabber/screen.c
+++ b/mcabber/mcabber/screen.c
@@ -186,14 +186,19 @@
#define SPELLBADCHAR 5
+#if defined(WITH_ENCHANT) || defined(WITH_ASPELL)
+typedef struct {
#ifdef WITH_ENCHANT
-EnchantBroker *spell_broker;
--- a/mcabber/doc/help/en/hlp.txt
+++ b/mcabber/doc/help/en/hlp.txt
@@ -3,4 +3,4 @@
Display some help about a command or a topic.
If no argument provided a usage of this command is printed.
-Available commands: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, status_to, status, version.
+Available commands: add, alias, authorization, bind, buffer, carbons, chat_disable, clear, color, connect, del, disconnect, echo, event, group, help, iline, info, module, move, msay, otr, otrpolicy, pgp, quit, rawxml, rename, request, room, roster, say_to, say, screen_refresh, set, source, spellcheck_disable, spellcheck_enable, status_to, status, version.
--- /dev/null
+++ b/mcabber/doc/help/en/hlp_spellcheck_disable.txt
@hirthwork
hirthwork / AsyncCloseableIOSession.java
Created November 12, 2014 10:26
Asynchronous IOSession closing
package org.apache.http.impl.nio.reactor;
import java.io.IOException;
import java.nio.channels.ByteChannel;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.SelectableChannel;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
@hirthwork
hirthwork / EmptyHttpServer.java
Created November 12, 2014 17:11
Simple illustration problems with empty HttpEntities which is not returned to connections pool
import java.util.concurrent.TimeUnit;
import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.config.SocketConfig;
import org.apache.http.impl.bootstrap.HttpServer;
import org.apache.http.impl.bootstrap.ServerBootstrap;
@hirthwork
hirthwork / HttpAsyncService.patch
Last active August 29, 2015 14:10
Allow to send response from request consumer
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java b/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
index 8d6a23a..d85aa0b 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
@@ -98,6 +98,7 @@ import org.apache.http.util.Asserts;
*/
@Immutable // provided injected dependencies are immutable
public class HttpAsyncService implements NHttpServerEventHandler {
+ public static final String HTTP_EXCHANGE = "http.nio.http-exchange";
@hirthwork
hirthwork / nginx.conf
Created December 27, 2014 08:51
i2p rss crutches
server {
listen 127.0.0.1:81;
root /var/www/localhost/htdocs;
rewrite ^(.*)$ /i2p-proxy.php break;
location / {
proxy_read_timeout 5m;
fastcgi_param HTTP_HOST zzz.i2p;
@hirthwork
hirthwork / i2p-proxy.php
Created January 17, 2015 08:20
i2p-proxy.php
<?php
function headerfunc($ch, $str){
header($str);
return strlen($str);
}
function writefunc($ch, $str){
print $str;
flush();
return strlen($str);
--- a/mcabber/xmpp.c
+++ b/mcabber/xmpp.c
@@ -1538,7 +1538,9 @@
{
char *r;
char *buf;
+ GSList* roster_node;
int newbuddy;
+ guint subscription;
guint hook_result;
#!/bin/zsh
function usage() {
>&$2 echo -e "Usage: $1 <cookie> <user> [<since>]\nExample:"
>&$2 echo -e "\t$1 user=f25bf40e0bc05d002b407a53bb76c63ee20ef8f8 hirthwork 'week ago'"
}
if [ "$1" = --help ]
then
usage $0 1
exit 0
import java.io.IOException;
import java.io.StringReader;
import java.util.ArrayDeque;
import java.util.Deque;
public class Calc {
private final Deque<TokenType> tokens = new ArrayDeque<>();
private final Lexer lexer;