Skip to content

Instantly share code, notes, and snippets.

View himanshuxd's full-sized avatar
🦇

Himanshu S himanshuxd

🦇
View GitHub Profile
@himanshuxd
himanshuxd / cycle-denoise.lua
Created April 1, 2023 14:58 — forked from myfreeer/cycle-denoise.lua
mpv user-script to cycle between lavfi's denoise filters, tested over mpv 0.25.0-58-g99cef59fc
-- settings
-- key_binding: press the key specified below
-- to cycle between denoise filters below,
-- set it to nil to disable the binding
local key_binding = "n"
-- key_binding_reverse cycle between denoise filters below
-- in reverse order, set it to nil to disable the binding,
-- set it to a single-char string to enable
local key_binding_reverse = nil
@himanshuxd
himanshuxd / jupyterlab_shortcuts.md
Created March 1, 2022 13:07 — forked from discdiver/jupyterlab_shortcuts.md
Common Jupyter Lab Keyboard Shortcuts

If you are on a Mac, substitute command for control. Don't type the + (it means press both keys at once).

Shortcuts when in either command mode (outside the cells) or edit mode (inside a cell):

  • Shift + Enter run selected cell or cells - if no cells below, insert a code cell below

  • Ctrl + B toggle hide/show left sidebar

  • Ctrl + S save and checkpoint

  • Ctrl + Shift + S save as

Salesforce OAuth 2.0 JWT Bearer Token Flow Walk-Through

This document will walk you through how to create or configure a Salesforce application for use with JWT authentication. These configuration steps and the example code works as of Salesforce API version 42.0.

Prerequisites

Create an RSA x509 private key/certification pair

@himanshuxd
himanshuxd / WSL-context-menu.reg
Created April 1, 2020 15:34
This is for wsl.exe and do be sure to edit the icon path you want to be displayed in the context menu.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\WSL2]
@="Open Ubuntu Bash here"
"Icon"="Path\\to\\your\\file.ico"
[HKEY_CLASSES_ROOT\Directory\Background\shell\WSL2\command]
@="C:\Windows\System32\wsl.exe"
@himanshuxd
himanshuxd / bp
Last active May 25, 2020 06:30
battery percentage
28
@himanshuxd
himanshuxd / foo.py
Created January 1, 2020 15:23
command line gist creation test
ashu
@himanshuxd
himanshuxd / chocoinstall.bat
Created December 11, 2019 05:38
Single line Chocolately (Windows package manager install) use elevated admin cmd
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
@himanshuxd
himanshuxd / pixelate.py
Created October 27, 2019 14:13 — forked from scottrogowski/pixelate.py
Pixelate image in python
#!/usr/bin/env python
# This script will pixelate most jpg and png images
# It will both show you the result and save it
import sys
import matplotlib.pyplot as plt
import numpy as np
import PIL.Image as Image
@himanshuxd
himanshuxd / pixelate_image.py
Created October 27, 2019 14:13 — forked from danyshaanan/pixelate_image.py
A Python script to pixelate an image and add a thin black margin between the simulated pixels.
from PIL import Image
backgroundColor = (0,)*3
pixelSize = 9
image = Image.open('input.png')
image = image.resize((image.size[0]/pixelSize, image.size[1]/pixelSize), Image.NEAREST)
image = image.resize((image.size[0]*pixelSize, image.size[1]*pixelSize), Image.NEAREST)
pixel = image.load()
@himanshuxd
himanshuxd / pip_install.py
Created February 23, 2019 18:06
All the ML pip installs you need
py -m pip install opencv-python numpy scipy pandas matplotlib