Skip to content

Instantly share code, notes, and snippets.

View spurgeonbj's full-sized avatar
🏠
Working from home

Spurgeon spurgeonbj

🏠
Working from home
  • India
View GitHub Profile
@spurgeonbj
spurgeonbj / commands.md
Created August 7, 2023 05:44 — forked from jramnai/commands.md
Useful commands in Open edX

Useful commands in Open edX

Change access permission of pem file

sudo chmod 400 my_private_key.pem  

SSH into your server

ssh -i my_private_key.pem ubuntu@ 
@spurgeonbj
spurgeonbj / gist:a9ed2ba1640d66cb39a45092f0e97bf2
Created February 11, 2023 05:36
C# Traverse a HTML WebControl to get Inner HTML
HtmlGenericControl myControl = (HtmlGenericControl)this.FindControl("CoursesDataDiv");
StringBuilder sb = new StringBuilder();
using (StringWriter sw = new StringWriter(sb))
{
using (HtmlTextWriter htw = new HtmlTextWriter(sw))
{
myControl.RenderControl(htw);
}
}
string markup = sb.ToString();
@spurgeonbj
spurgeonbj / IFSCLookup.js
Last active February 11, 2023 05:37
Lookup Indian Banks IFSC Code
function IFSCLookup(ifsccode) {
const ifscode = $('#ifsccode').val().trim().toUpperCase();
if (ifscode) {
// lookup ifsc and populate bank data if available
const ifscapiurl = "https://ifsc.razorpay.com/" + ifscode;
$.get(ifscapiurl, function (bankdata, reqstatus) {
if (reqstatus === "success") {
$("#ifsccode").val(ifscode);
$("#bankname").val(bankdata.BANK);