Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

N.S.Devaraj nsdevaraj

🎯
Focusing
View GitHub Profile
@nsdevaraj
nsdevaraj / Trigger.js
Last active Jun 10, 2022
Update version
View Trigger.js
const path = require('path');
const fs = require('fs-extra');
const packageJsonsToUpdate = ['./ibcslibrary/packages/matrix-app/package.json', './ibcslibrary/packages/matrix-core/package.json', './ibcslibrary/packages/matrix-playground/package.json', './ibcslibrary/lerna.json',];
const bumpVersion = (oldVersionNumber) => {
let versionParts = oldVersionNumber.split('.');
var vArray = {
vMajor: versionParts[0],
vMinor: versionParts[1],
vPatch: versionParts[2],
View licenseAPI.ts
import powerbi from "powerbi-visuals-api";
import IVisualLicenseManager = powerbi.extensibility.IVisualLicenseManager;
import LicenseNotificationType = powerbi.LicenseNotificationType;
import LicenseInfoResult = powerbi.extensibility.visual.LicenseInfoResult;
interface IDisplayedNotification {
isIconDisplayed: boolean;
isBlockerDisplayed: boolean;
@nsdevaraj
nsdevaraj / YouTube.py
Created Jan 13, 2022
Download YouTube videos
View YouTube.py
from pytube import YouTube
DOWNLOAD_FOLDER = "/Users/devarajns/Downloads"
video_url = "https://www.youtube.com/watch?v=6Se3SmOkAII"
video_obj = YouTube(video_url),
stream = video_obj.streams.get_highest_resolution()
stream.download(DOWNLOAD_FOLDER)
View சுழிகுளம்.txt
சுழிகுளம்' என்ற சித்திரக் கவிக்குப் பரிதிமாற் கலைஞர் தரும் எடுத்துக் காட்டுச்
செய்யுள் இது
"கமுதி யார் பா வே
விலையரு மா நற்பா
முயல் வ துறுநர்
View Editorlog.txt
visualbis
N.S.Devaraj
build591
Publish npm package
15s
#!/bin/bash -eo pipefail
if [ "${CIRCLE_PROJECT_USERNAME}" == "visualbis" ]; then
npm run build && npm publish
else
View scrcpy
1. Connect the device to the same Wi-Fi as your computer
2. Get your device IP address (in Settings → About phone → Status)
3. Enable adb over TCP/IP on your device: adb tcpip 5555
4. Connect to your device: adb connect DEVICE_IP:5555 (replace DEVICE_IP)
5. Unplug your device
6. Run scrcpy as usual
To switch back to USB mode: adb usb.
View getPageDimensionsPt.js
getPageDimensionsPt : function(paperSize, orientation) {
var pageDimensionsPt = {};
if (orientation.toLowerCase() === "portrait") {
switch (paperSize.toLowerCase()) { // 72DPI
case "a2":
pageDimensionsPt.height = 1648;
pageDimensionsPt.width = 1191;
break;
case "a3":
View markRowHeaderRowsForExpansion.js
/*
* Mark rows which have cells in the row header columns with text that's longer than the cell width
*
* Notes:
*
* - See https://wiki.wdf.sap.corp/wiki/display/zen/Crosstab+span+cells for span cell position reference.
* - Representation of default cell width /maxTextWidthPx in the ASCII tables below: +--------------+ = 16 chars
* - The actual modification of the crosstab data is done in expandHeaderRowsAndWrapText - this function
* adds flags to record what needs to be done later
*
View markColumnHeaderRowsForExpansion.js
/*
* Mark column header rows which have cells with text that's longer than the cell width
*
* Notes:
*
* - Representation of default cell width /maxTextWidthPx in the ASCII tables below: +--------------+ = 16 chars
* - The actual modification of the crosstab data is done in expandColumnHeaderRowsAndWrapText - this function
* adds flags to record what needs to be done later
*
* 5 cases:
View keybase.md

Keybase proof

I hereby claim:

  • I am nsdevaraj on github.
  • I am nsdevaraj (https://keybase.io/nsdevaraj) on keybase.
  • I have a public key ASAXfEr5PAZjhw_DeUfOCLNOq24-RNISKcGZ0WyqJuUX4go

To claim this, I am signing this object: