I hereby claim:
- I am marcetcheverry on github.
- I am marcetcheverry (https://keybase.io/marcetcheverry) on keybase.
- I have a public key ASChScwC2GS1glKbM-JQ_eCEtjCbGgd4vCNEMgTLtbJesgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
extension String { | |
/// Using regular expressions is not a correct approach for converting HTML to text, there are many pitfalls, like handling <style> and <script> tags. On platforms that support Foundation, one alternative is to use NSAttributedString's basic HTML support. Care must be taken to handle extraneous newlines and object replacement characters left over from the conversion process. It is a good idea to cache complex generated NSAttributedStrings either through storage or NSCache. | |
func strippingHTML() throws -> String? { | |
if isEmpty { | |
return nil | |
} | |
if let data = data(using: .utf8) { | |
let attributedString = try NSAttributedString(data: data, | |
options: [.documentType : NSAttributedString.DocumentType.html, |
#!/bin/bash | |
##### | |
# beas.sh - Bash Email Admin Script | |
# Version 0.3 (Jessie edition) | |
# (c) 2015 Emmanuel Revah - manu-at-manurevah.com | |
# (c) 2015 Marc - [email protected] | |
# This script is made to go with the tutorial found here |
// Compile: clang -dynamiclib -Wl,-current_version 1.0 mylib.c -o mylib.dylib | |
// See it with otool -L mylib.dylib | |
//mylib.dylib: | |
// mylib.dylib (compatibility version 0.0.0, current version 1.0.0) | |
#include <stdio.h> | |
__attribute__((constructor)) | |
static void initialize() { | |
printf("Initializing MyLib\n"); |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <fcntl.h> | |
#include <sys/stat.h> | |
#include <sys/mman.h> | |
#include <unistd.h> | |
int main(int argc, const char *argv[]) | |
{ |