Skip to content

Instantly share code, notes, and snippets.

View csemrm's full-sized avatar

Mostafizur Rahman csemrm

View GitHub Profile
@csemrm
csemrm / create_a_virtual_environment_with_conda.md
Created March 18, 2023 20:04 — forked from loic-nazaries/create_a_virtual_environment_with_conda.md
Markdown file to help create a virtual environment in Python with Conda.

Create a Virtual Environment in Python with Conda

The present gist is a hybrid between a 'go-to' cheat sheet and a tutorial when starting a new Data Science Project.

Its purpose is to create a virtual environment for Python with the package manager Conda.


Table of contents

#This is just a listing of the commands for generating your SSL certificates
#Run these commands one at a time from inside your ~/ssl folder
#Make sure you create your server.csr.cnf and your v3.ext files first inside the same folder
#private key generation
#This will ask you for a passphrase(password) do NOT lose this file or the password
openssl genrsa -des3 -out ~/ssl/rootCA.key 2048
#create root certificate
openssl req -x509 -new -nodes -key ~/ssl/rootCA.key -sha256 -days 1024 -out ~/ssl/rootCA.pem
@csemrm
csemrm / self-signed-ssl-mongo.sh
Created October 25, 2021 15:20 — forked from mostafizpantheon/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
@csemrm
csemrm / P12toPEM.txt
Created August 29, 2018 11:03 — forked from shahdhiren/P12toPEM.txt
Convert P12 file for Push Notification to PEM format
Development Phase:
Step 1: Create Certificate .pem from Certificate .p12
Command: openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
Step 2: Create Key .pem from Key .p12
Command : openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12
Step 3: Optional (If you want to remove pass phrase asked in second step)
Command : openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem
@csemrm
csemrm / Readme.md
Created July 27, 2018 10:55 — forked from grantges/Readme.md
Shapes With Appcelerator Titanium and Hyperloop

Custom Alloy Tags based on Appcelerator Hyperloop modules

With Alloy and Hyperloop, you can quickly and easily expose native UI as Custom Alloy tags by leveraging the namespace (ns) attribute and commonjs modules.

Alloy allows you to create your own UI element that can be included into the XML View heirarchy in one of two ways, an Alloy Widget or through the use of Custom Tags.

To create your own custom tag, you link the tag to the commonjs module with the namespace attribute (ns). Here is an example using a custom tag to render a standard Titanium View:

@csemrm
csemrm / Gruntfile.js
Created March 14, 2018 18:15 — forked from FokkeZB/Gruntfile.js
Example Gruntfile.js for The Ultimate Titanium CLI Toolchain at Connect.js
module.exports = function(grunt) {
grunt.initConfig({
settings: {
releaseNotes: grunt.option('notes') || 'CI build',
appName: 'Flashlight',
ppUuid: '0253600x-ac6d-35b6-b66d-dd25c4fd956f',
installrAppToken: '6xC0I8SdJA76kW3pqq7GFZLIyq6fBP4Z'
},
var FBSDKShareLinkContent = require("FBSDKShareKit/FBSDKShareLinkContent"),
FBSDKShareDialog = require("FBSDKShareKit/FBSDKShareDialog"),
NSURL = require("Foundation/NSURL");
var win = Ti.UI.createWindow({
backgroundColor: "#fff"
});
var btn = Ti.UI.createButton({
title: "Trigger Share Dialog"
@csemrm
csemrm / titanium-auth-session.js
Created February 13, 2018 20:07 — forked from hansemannn/titanium-auth-session.js
Use Axway Hyperloop to perform OAuth-sessions with the iOS 11+ API "SFAuthenticationSession"
const SFAuthenticationSession = require('SafariServices/SFAuthenticationSession');
const NSURL = require('Foundation/NSURL');
const session = SFAuthenticationSession.alloc().initWithURLCallbackURLSchemeCompletionHandler(
NSURL.alloc().initWithString('https://github.com/login/oauth/authorize?scope=repo&client_id=XXXXX'),
'appcgithub://',
function(url, error) {
if (error != null) {
Ti.API.error('Error performing OAuth: ' + error.localizedDescription);
cb({ success: false, error: 'Error performing OAuth: ' + error.localizedDescription });
@csemrm
csemrm / gist:585fbbb598b39becb85f74c8b6043b2b
Created January 18, 2018 10:25 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@csemrm
csemrm / credentials.js
Created August 31, 2017 07:59 — forked from aaronksaunders/credentials.js
Updated Instagram Integration with Appcelerator, all the files you need are here, be sure to include the promises library in your project
exports.C = {
INSTAGRAM_CLIENT_ID : 'replace this with your public', //replace this with your public
INSTAGRAM_CLIENT_SECRET : 'replace this with your private key', //replace this with your private key
INSTAGRAM_CALLBACK_URL : 'replace this with your INSTAGRAM_CALLBACK_URL'
};