Skip to content

Instantly share code, notes, and snippets.

View JaleelNazir's full-sized avatar
🚣‍♀️
Focusing

Jaleel Nazir JaleelNazir

🚣‍♀️
Focusing
View GitHub Profile
(function(e, a) { for(var i in a) e[i] = a[i]; }(window, /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
@JaleelNazir
JaleelNazir / jwt-apple-signin.py
Created October 29, 2020 18:58 — forked from davidhariri/jwt-apple-signin.py
Code required to verify Sign in with app-made Apple JWT tokens server-side in Python
import jwt
from jwt.algorithms import RSAAlgorithm
import requests
from time import time
import json
import os
APPLE_PUBLIC_KEY_URL = "https://appleid.apple.com/auth/keys"
APPLE_PUBLIC_KEY = None
@JaleelNazir
JaleelNazir / jwt-apple-signin.py
Created October 29, 2020 18:58 — forked from davidhariri/jwt-apple-signin.py
Code required to verify Sign in with app-made Apple JWT tokens server-side in Python
import jwt
from jwt.algorithms import RSAAlgorithm
import requests
from time import time
import json
import os
APPLE_PUBLIC_KEY_URL = "https://appleid.apple.com/auth/keys"
APPLE_PUBLIC_KEY = None
def generate_RSA(bits=2048):
'''
Generate an RSA keypair with an exponent of 65537 in PEM format
param: bits The key length in bits
Return private key and public key
'''
from Crypto.PublicKey import RSA
new_key = RSA.generate(bits, e=65537)
public_key = new_key.publickey().exportKey("PEM")
private_key = new_key.exportKey("PEM")
@JaleelNazir
JaleelNazir / letsencrypt_2017.md
Created September 19, 2019 13:14 — forked from grigorkh/letsencrypt_2017.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two modes when you don't want Certbot to edit your configuration:

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80) to renew certificates.

In the following, we're setting up mydomain.com to be served from /var/www/mydomain, and challenges will be served from /var/www/letsencrypt.

@JaleelNazir
JaleelNazir / AppDelegate.swift
Created February 5, 2019 10:06 — forked from sawapi/AppDelegate.swift
[Swift] Push Notification
//
// AppDelegate.swift
// pushtest
//
// Created by sawapi on 2014/06/08.
// Copyright (c) 2014年 sawapi. All rights reserved.
//
// iOS8用
import UIKit
{
"revisions": 29,
"minimum_app_version" : 1,
"current_app_version" : 9,
"new_features" : ["We are running through ads - Rate with 5 stars & support us"],
"force_update_msg": "Dude, sorry!, We released new version of the app with Error and Crash fixes. So We want you to try must...;-/",
"privacy_policy_url": "https://fictosstatussaver.blogspot.com/2020/09/fictos-status-saver-privacy-policy.html"
}
# coding: utf-8
# In[1]:
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import requests
from bs4 import BeautifulSoup
https://www.indiapost.gov.in/_layouts/15/dop.portal.uilayer/js/statedistrict.js?rev=aHYKwmIuYqmvhy0Fo4Jtdw%3D%3D
function PopulateStateDistricts() { return '<C><B><SC>01</SC><SN>Andhra Pradesh</SN><A><DC>0007</DC><DN>Kurnool</DN></A><A><DC>0013</DC><DN>West Godavari</DN></A><A><DC>0002</DC><DN>Chittoor</DN></A><A><DC>0005</DC><DN>Kadapa</DN></A><A><DC>0009</DC><DN>Prakasam</DN></A><A><DC>0003</DC><DN>East Godavari</DN></A><A><DC>2520</DC><DN>Cuddapah</DN></A><A><DC>0010</DC><DN>Srikakulam</DN></A><A><DC>0011</DC><DN>Visakhapatnam</DN></A><A><DC>0004</DC><DN>Guntur</DN></A><A><DC>0001</DC><DN>Ananthapur</DN></A><A><DC>0008</DC><DN>Nellore</DN></A><A><DC>0006</DC><DN>Krishna</DN></A><A><DC>0012</DC><DN>Vizianagaram</DN></A></B><B><SC>02</SC><SN>Arunachal Pradesh</SN><A><DC>0028</DC><DN>Upper Subansiri</DN></A><A><DC>0016</DC><DN>Dibang Valley</DN></A><A><DC>0023</DC><DN>Lower Subansiri</DN></A><A><DC>0026</DC><DN>Tirap</DN></A><A><DC>0018</DC><DN>East Siang</DN></A><A><DC>0024</DC><DN>Papum Pare</DN></A><A><D
@JaleelNazir
JaleelNazir / rm_mysql.md
Last active May 11, 2018 18:33 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql