Skip to content

Instantly share code, notes, and snippets.

View nagasudhirpulla's full-sized avatar
🎯
Focusing

NagaSudhir Pulla nagasudhirpulla

🎯
Focusing
View GitHub Profile
@nagasudhirpulla
nagasudhirpulla / Files.aspx
Last active January 13, 2024 14:26
Directory Browsing with sorting and additional columns in IIS
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Files.aspx.cs" Inherits="Files.FilesPage" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="Files" %>
<!DOCTYPE html>
<html>
<head>
<title>Contents of <%= path %></title>
<style type="text/css">
@nagasudhirpulla
nagasudhirpulla / number_to_words.js
Last active October 11, 2021 02:59
Javascript code to convert numbers to words in British system
function inWords(numIn) {
var inWordsSub = function(num) {
var a = ['', 'One ', 'Two ', 'Three ', 'Four ', 'Five ', 'Six ', 'Seven ', 'Eight ', 'Nine ', 'Ten ', 'Eleven ', 'Twelve ', 'Thirteen ', 'Fourteen ', 'Fifteen ', 'Sixteen ', 'Seventeen ', 'Eighteen ', 'Nineteen '];
var b = ['', '', 'Twenty', 'Thirty', 'Forty', 'Fifty', 'Sixty', 'Seventy', 'Eighty', 'Ninety'];
var n = ('0000000' + num).substr(-7).match(/^(\d{2})(\d{2})(\d{1})(\d{2})$/);
if (!n) return;
var str = '';
str += (n[1] != 0) ? (a[Number(n[1])] || b[n[1][0]] + ' ' + a[n[1][1]]) + 'Lakh ' : '';
str += (n[2] != 0) ? (a[Number(n[2])] || b[n[2][0]] + ' ' + a[n[2][1]]) + 'Thousand ' : '';
str += (n[3] != 0) ? (a[Number(n[3])] || b[n[3][0]] + ' ' + a[n[3][1]]) + 'Hundred ' : '';
@nagasudhirpulla
nagasudhirpulla / timescaledb.md
Last active December 13, 2019 08:52
Timescaledb
@nagasudhirpulla
nagasudhirpulla / postgres.md
Last active December 4, 2019 04:40
Postgres
@nagasudhirpulla
nagasudhirpulla / raspberry_pi_notes_1.md
Last active August 1, 2020 13:51
Raspberry pi Notes

Setting Raspbery pi zero for wifi

  • setting up tutorial
  • Download Raspbian lite
  • Flash Raspbian lite zip file into SD card using etcher software
  • If SD card is showing wrong capacity or shown as 2 disks, goto device management and delete all partitions of sd card, create new simple volumn of type FAT32. Even then, if etcher could not flash raspbian, try using another laptop.
  • save a file named ssh (no extension) in the sd card
  • write the following in a file named wpa_supplicant.conf and save it in the sd card
country=in
@nagasudhirpulla
nagasudhirpulla / psp_meas_api_notes.md
Last active October 9, 2019 12:20
PSP measurements description

Each measurement is given an Id and queries are assigned to them Queries will have placeholders for time range Measurement Id will not have spaces

id name query_string date_type
1 WR_DAY_PEAK_DEMAND select date_key, peak_demand_met from REPORTING_UAT.regional_availability_demand where date_key between {start_time} and {end_time} order by date_key date_key
2 WR_DAY_PEAK_S
@nagasudhirpulla
nagasudhirpulla / pasteFile.py
Created August 12, 2018 14:34
python file transfer in network
# -*- coding: utf-8 -*-
"""
Created on Sun Aug 12 19:22:37 2018
@author: Nagasudhir
https://ashishpython.blogspot.com/2013/11/how-to-connect-one-computer-to-another_1.html?m=1
https://www.howtogeek.com/howto/16196/how-to-disconnect-non-mapped-unc-path-drives-in-windows/