Skip to content

Instantly share code, notes, and snippets.

View Svastikkka's full-sized avatar
🏛️
Working from Gift City

Manshu Sharma Svastikkka

🏛️
Working from Gift City
View GitHub Profile

Curl with Java KeyStore

Curl doesn't have support for java keystore file, so therefor the file should be converted to a PEM format. It consists of the following multiple steps:

  1. Convert keystore to p12 file
  2. Convert p12 file to pem file
  3. Run curl command with pem files

Convert keystore to p12 file

keytool -importkeystore -srckeystore truststore.jks -destkeystore truststore.p12 -srcstoretype JKS -deststoretype PKCS12
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@Svastikkka
Svastikkka / postfix-gmail-macos.md
Created December 14, 2020 11:02 — forked from giovanigenerali/postfix-gmail-macos.md
Postfix Gmail relay on macOS Sierra & macOSHigh Sierra

Postfix Gmail relay on macOS Sierra & macOSHigh Sierra

1 - Create a file to store our credentials:

sudo vim /etc/postfix/sasl_passwd

2 - Add something like this:

@Svastikkka
Svastikkka / NPM commands cheat sheet.md
Last active December 7, 2020 11:39
NPM commands cheat sheet

Npm has a lot of commands, lets make a cheat sheet!

Community Features

  • adduser (alias: add-user | login)

    Create or Login into the npm server.

npm adduser

@Svastikkka
Svastikkka / nodejs-cheatsheet.js
Created December 7, 2020 05:23 — forked from LeCoupa/nodejs-cheatsheet.js
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@Svastikkka
Svastikkka / Search my gists.md
Created October 2, 2020 21:25 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

def multiplyList(myList):
# Multiply elements one by one
result = 1
for x in myList:
result = result * int(x)
return result
def solve(n):
c=0
def hornerRule(poly,n,x):
result=poly[0]
for i in range(1,n):
result=result*x+poly[i]
return result
arr=list(map(int,input().split))
x=int(input())
len=len(arr)
print(hornerRule(arr,len,x))
## Read input as specified in the question.
## Print output as specified in the question.
class Node:
def __init__(self,data):
self.data=data
self.next=None
def LinkedLists(arr):
head=None
tail=None
p=int(input())
q=int(input())
print((p*q)/(p+q))