Skip to content

Instantly share code, notes, and snippets.

View amejiasp's full-sized avatar
😊

Alejandro Mejías Pavón amejiasp

😊
View GitHub Profile
@amejiasp
amejiasp / A tutorial for porting to autoconf & automake
Created February 17, 2018 10:34
A tutorial for porting to autoconf & automake
A tutorial for porting to autoconf & automake
l.u. 21/11/2005
A first disclaimer is that I don't really like autoconf and automake. This is not the place for longer dissertations, so I won't spend more words on this. However, it is a matter of facts that many users just like to fetch your application, and issue the usual ./configure && make && make install right ahead.
So, this is a synthetic tutorial for moving a Makefile-based program to an autohell- (this is a popular way to refer to { autoconf, automake, libtool } that I will encourage) enabled package.
A somewhat complete, likely example is given here. If your PRE is not exactly like the one proposed, you just probably won't need to perform the corresponding following steps.
Definition of the problem:
@amejiasp
amejiasp / libevent_multi_worker
Created February 5, 2018 18:49 — forked from fxsjy/libevent_multi_worker
libevent multithread worker example
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <assert.h>
#include <signal.h>
#include <event2/event.h>
#include <event2/bufferevent.h>
#include <event2/buffer.h>
#include <event2/thread.h>
@amejiasp
amejiasp / gist:fa266280659953e4aa64740740c2627d
Created June 9, 2017 04:20
Borrar node y todos sus paquetes
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
@amejiasp
amejiasp / gist:62d981da0a99bbc305993cb10e7c0329
Created June 9, 2017 04:19
Cómo aceptar cualquier certificado en IOS
añadir a AppDelegate, al final, esto
@implementation NSURLRequest(DataController)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host
{
return YES;
}
@end
zipalign -v -p 4 unsigned.apk aligned.apk
apksigner sign —ks keystone.jsk —out release.apk aligned.apk