Skip to content

Instantly share code, notes, and snippets.

View nsdevaraj's full-sized avatar
🎯
Focusing

N.S.Devaraj nsdevaraj

🎯
Focusing
View GitHub Profile
@nsdevaraj
nsdevaraj / fixguid.sh
Created September 2, 2022 09:54
modifies pbiviz guid
vizfile=$(ls *.pbiviz)
mv -- "$vizfile" viz.zip
unzip viz.zip
guidfile=$(ls resources)
echo $guidfile
arrIN=(${guidfile//./ })
guid=${arrIN[0]}
echo $guid
pkg=package.json
sed -i -- "s/${guid}/mov${guid}/g" "${pkg}"
arch=$(uname -m)
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then
flag=1
else
flag=0
fi
echo "Installing OpenCV 2.4.5"
sudo apt-get update
mkdir OpenCV
cd OpenCV
@nsdevaraj
nsdevaraj / Trigger.js
Last active September 6, 2022 04:59
Update version
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],
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 January 13, 2022 04:55
Download YouTube videos
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)
@nsdevaraj
nsdevaraj / சுழிகுளம்.txt
Created September 3, 2020 08:20
சுழிகுளம்
சுழிகுளம்' என்ற சித்திரக் கவிக்குப் பரிதிமாற் கலைஞர் தரும் எடுத்துக் காட்டுச்
செய்யுள் இது
"கமுதி யார் பா வே
விலையரு மா நற்பா
முயல் வ துறுநர்
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
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.
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":
/*
* 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
*