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 / 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()
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
alias ll='ls -alF'
alias l='ls -alF'
alias c='clear'
alias .='echo $PWD'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
@himanshuxd
himanshuxd / OpenWithSublimeText3.bat
Created July 13, 2018 06:43 — forked from PieterScheffers/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 10)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f