Skip to content

Instantly share code, notes, and snippets.

View sayan1886's full-sized avatar

Sayan Chatterjee sayan1886

  • IBM
  • India
  • 21:34 (UTC +05:30)
  • LinkedIn in/mesayan
View GitHub Profile
#!/usr/bin/env groovy
pipeline {
agent any
tools {nodejs "latest"}
stages {
stage('preflight') {
steps {
echo sh(returnStdout: true, script: 'env')
sh 'node -v'
}
@sayan1886
sayan1886 / self-signed-ssl-mongo.sh
Created February 15, 2022 09:35 — forked from exAspArk/self-signed-ssl-mongo.sh
Self-signed SSL Certificate with OpenSSL on MacOS | MongoDB
openssl genrsa -out CAroot.key 2048
openssl req -new -key CAroot.key -out CAroot.csr # CN should be different from the certificates below
openssl req -x509 -days 1825 -key CAroot.key -in CAroot.csr -out CAroot.crt
cat CAroot.crt CAroot.key > CAroot.pem
openssl genrsa -out mongod.key 2048
openssl req -new -key mongod.key -out mongod.csr
openssl x509 -req -days 1825 -in mongod.csr -CA CAroot.pem -CAkey CAroot.key -CAcreateserial -out mongod.crt
cat mongod.crt mongod.key > mongod.pem
@interface NSManagedObject (Serialization)
- (NSDictionary*) toDictionary;
- (void) populateFromDictionary:(NSDictionary*)dict;
+ (NSManagedObject*) createManagedObjectFromDictionary:(NSDictionary*)dict
inContext:(NSManagedObjectContext*)context;
@end
// LICENSE: USE IT IF YOU NEED IT, BUT PLEASE MENTION AT LEAST MY NAME, THANKS!
// (Juraj Suchán, [email protected])
//
// PREFACE:
// So i've been building client application for one local "closed community"
// nyx.cz for year and a half where the displayed content is standard html code.
//
// There is Html.fromHtml to the rescue for that! But unfortunatelly, anyone who tried it
// have to deal with custom Html.ImageGetter implementation.
// This interface contains only one method, with only one paramter (url) and it's completelly
// LICENSE: USE IT IF YOU NEED IT, BUT PLEASE MENTION AT LEAST MY NAME, THANKS!
// (Juraj Suchán, [email protected])
//
package sk.virtualvoid.nyxdroid.utils;
import java.io.File;
import java.lang.ref.WeakReference;
import java.util.Collections;
import java.util.Map;
import java.util.WeakHashMap;