Skip to content

Instantly share code, notes, and snippets.

View sag333ar's full-sized avatar

sagar kothari sag333ar

View GitHub Profile
@abhi21git
abhi21git / ExtensionURLRequest.swift
Last active February 19, 2024 12:23
Swift cURL Printer
//
// ExtensionURLRequest.swift
//
// Created by Abhishek Maurya on 16/07/20.
// Copyright © 2020. All rights reserved.
//
import Foundation
extension URLRequest {
@15Dkatz
15Dkatz / installing_postgresql.md
Last active June 8, 2024 08:50
PostgreSQL installation tutorial

Let's install PostgreSQL onto your operating system.

As an open source object-relational database management system, PostgreSQL available for MacOS, Linux, and Windows.

Goal for each Operating System

The goal will be to run the following command successfully from the command line (regardless of the OS):

psql -U postgres

This should open the psql interactive shell and print a prompt that looks like:

@awesometic
awesometic / RSACipher.java
Last active January 11, 2024 07:15
RSA encryption example for android
/**
* Created by Awesometic
* It's encrypt returns Base64 encoded, and also decrypt for Base64 encoded cipher
* references: http://stackoverflow.com/questions/12471999/rsa-encryption-decryption-in-android
*/
import android.util.Base64;
import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;
import java.security.KeyFactory;
@ritesh-fueled
ritesh-fueled / iOSAttributedString
Last active August 29, 2015 13:56
Attributed String
NSMutableAttributedString *attributedString =
[[NSMutableAttributedString alloc]initWithString:@"someText"];
NSDictionary *defaultProperties = @{ NSFontAttributeName : [UIFont defaultFont],
NSForegroundColorAttributeName : [UIColor defaultColor]};
NSDictionary *uniqueProperty = @{ NSFontAttributeName : [UIFont uniqueFont],
NSForegroundColorAttributeName : [UIColor uniqueColor]};
[attributedString addAttributes:defaultProperties
range:NSMakeRange(defaultStartLocationInIntegers,