Skip to content

Instantly share code, notes, and snippets.

View PrateekKumarSingh's full-sized avatar

Prateek Singh PrateekKumarSingh

View GitHub Profile
#!/usr/bin/python
import os
# YouTube video searching API
from apiclient.discovery import build
from apiclient.errors import HttpError
from oauth2client.tools import argparser
# Downloading YouTube videos
import pafy
<#
.SYNOPSIS
Resize an image
.DESCRIPTION
Resize an image based on a new given height or width or a single dimension and a maintain ratio flag.
The execution of this CmdLet creates a new file named "OriginalName_resized" and maintains the original
file extension
.PARAMETER Width
The new width of the image. Can be given alone with the MaintainRatio flag
.PARAMETER Height
See: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs build-essential libx11-dev
See: https://gist.github.com/ted-piotrowski/e5c223a6a2f6f3079cb38c959ceecaa6
git clone https://github.com/Microsoft/vscode
cd vscode
./scripts/npm.sh install --arch=armhf
@PrateekKumarSingh
PrateekKumarSingh / Get-Snoverism.ps1
Last active October 24, 2020 07:48 — forked from dfinke/Get-Snoverism.ps1
Wisdom form the Shellfather, Jeffrey Snover - via Don Jones
Function Get-Snoverism
{
$URL = "http://snoverisms.com/"
(Invoke-WebRequest $URL).images.src |?{$_ -match 'quotes'}| Get-Random -Count 1 | %{$URL+$_}
}
Function Get-ImageText()
{
[CmdletBinding()]
Param(