d
Amit DhamuSoftware Engineer

Snippets

268

javascript

0
Encode image as base64 using fetch

javascript

0
String to camelCase

python

0
Flatten a directory

css

0
3 ways to center a div

typescript

0
Convert roman numeral to number

javascript

0
Check if phrase is a palindrome

javascript

0
10 handy regular expressions

typescript

0
Recursively deep merging objects

shell

0
Flags in Bash with getopts

shell

0
Switch statement in Bash

javascript

0
Leading zeros with padStart

javascript

0
is_numeric

javascript

0
Scroll Into View With Offset

sql

0
Using string_agg in PostgreSQL

shell

0
Git Status Porcelain

testing

0
Spying on localStorage in Jest

testing

0
Advance Timers in Jest

typescript

0
Debounce

javascript

0
Omit property from object

typescript

0
Time of day greeting

react

0
Scroll Progress Bar Indicator

javascript

0
Unique values from array of objects

shell

0
Commit case changed filenames in Git

react

0
Smooth Scroll to Top

typescript

0
Read Time in minutes

typescript

0
Cartesian Product

javascript

0
Sharing with navigator.share

shell

0
Git status - files only

shell

0
Search in files and move to directory

javascript

0
Get domain without subdomain

javascript

0
Find a HTML Element With Text

shell

0
Create A Folder For Each File

javascript

0
Capitalize Word

misc

0
CTRL+CMD+DOWN in VSCode

css

0
Invert Images

javascript

0
Sort Array of Objects by Property

javascript

0
Write to a File in Node

php

0
Valid PHP Types

php

0
is_countable

php

0
Replacing MsSQL_ functions

php

0
Migrating from mysql_ to mysqli_

javascript

0
YYYY-MM-DD in Javascript

misc

0
List Available Makefile Commands

javascript

0
Generate Initials From String

misc

0
Restore macOS Desktop

misc

0
Delete Git Tag

misc

0
Prevent Safari Reopening Previous Session

python

0
Using argparse For Script Arguments

shell

0
Truncate A File

python

0
File Operations In Python

python

0
Loops In Python

shell

0
Bash - For Loop With Range

misc

0
Handy Docker Commands

misc

0
macOS - Get Serial Number

misc

0
Recent Items in macOS Dock

shell

0
Bash - If In Array

sql

0
Helpful mysqldump Commands

css

0
Bootstrap 4 SCSS Breakpoint Utility Mixins

misc

0
Trim Whitespace Pixels with Imagemagick

shell

0
What's Using A Port

misc

0
Chrome (macOS) - Delete URL Suggestion

misc

0
Solr - Select Distinct Field

misc

0
Change Sublime Text 3 Title Bar Colour on macOS

misc

0
Test /etc/fstab

shell

0
Reformat A Hard Drive on Ubuntu

python

0
Write File Contents in Python

misc

0
Force Delete iCloud Account on macOS

shell

0
Step Through Commits On A Branch In Git

php

0
Case Insensitive Multi Dimensional Array Sort

javascript

0
Is Element Visible In Viewport

shell

0
Search For String In Files

misc

0
Pip - Install Specific Hash, Branch or Tag

misc

0
Plex Downloads API

misc

0
Eject Disc From CD/DVD Drive on Mac

shell

0
Generate LetsEncrypt SSL Certificate

shell

0
Update Plex From Command Line on Ubuntu

javascript

0
Upgrade Node From NPM

shell

0
Use Heredoc In Bash Script

javascript

0
Get List of NPM Packages

server

0
Redirect to https & non-www in NGINX

javascript

0
Escape HTML

javascript

0
Get Query Parameters

shell

0
Create Multiple Subdirectories At Once

css

0
Clear Button On Input Field

javascript

0
Redirect to HTTPS in Express

javascript

0
Strip Trailing Slashes From Express Requests

misc

0
Install VirtualBoxGuestAdditions In Ubuntu

shell

0
Recursively Find and Delete File

misc

0
Restart Plex From Command Line

misc

0
Install Ruby Gem Behind Proxy

misc

0
Hide Minified File Contents From Git History

shell

0
Search Occurrences In Between Two Strings

misc

0
Git - Change Remote Origin

php

0
Convert XML to Array

css

0
If Statements in SASS

shell

0
Watch Filesize On Command Line

html

0
Placeholder Image if Src Unavailable

shell

0
Get Number of Commits by Author in Git

shell

0
Temporarily Ignore File in Git

shell

0
Search Git Commit History

javascript

0
Social Media Share Counts

misc

0
Solr - Delete By Query

javascript

0
Default Parameter in Function

css

0
Generate Colour Classes in SASS

shell

0
Use Terminal Through Proxy

misc

0
Vim Commands

shell

0
Git Commands

shell

0
UNIX Commands

jquery

0
Insert Character At Position

php

0
MySQL to CSV Export

jquery

0
Check If Radio Button Has Been Checked

jquery

0
Open External Links In New Tab

misc

0
Use Browser As Notepad

sql

0
Get Date If After Interval

misc

0
Mac Recovery Tools

misc

0
Restart Mac In Safe Mode

php

0
Load Random Image From Directory

css

0
Fullscreen Styling

jquery

0
On The Fly Form With jQuery

javascript

0
Comma Separated String To Array

css

0
Make Images Black and White

shell

0
FTP Upload Using Command Prompt or Terminal

jquery

0
Wrap Element Around Other Element

php

0
Exif Image Data

misc

0
Add Close All To Sublime Text Tab Menu

php

0
Search Files Using glob()

php

0
Write To A Text File

shell

0
Handy Shell Commands (Windows)

javascript

0
Double Click Event

server

0
HTTP Authentication

jquery

0
Toggle Text Function

php

0
Useful Folder and File Functions in PHP

jquery

0
Select Nth Class of Element

jquery

0
Scroll To Bottom of Element

css

0
Pure CSS Speech Bubble

jquery

0
Implement Keyboard Shortcuts For Your Website

html

0
Favicon For Windows 8 Tile

php

0
Append To Text File

php

0
mysql_real_escape_string on Array

php

0
Autoload Class

php

0
Use An Array Recursively

javascript

0
Save Canvas as PNG

php

0
Detect AJAX Request in PHP

php

0
Ignore nl2br() Inside Pre/Code Tag

php

0
List System Drives - Windows Only

sql

0
Capitalise Field in Row

misc

0
Create A Lockscreen Shortcut in Windows

php

0
Remove File Extension

jquery

0
Self Executing Function

php

0
Social Bookmark Share Function

php

0
Recursive Directory Scanning

jquery

0
Get Mouse Coordinates

php

0
Get File Extension

css

0
Available List Style Types

css

0
Maintain Aspect Ratio

php

0
Check If Uppercase or Lowercase

php

0
Case Insensitive In Array Check

php

0
List System Drives

misc

0
Remove Empty Lines In SublimeText

php

0
CRUD Functions with PDO

php

0
Simple Select Query with PDO

misc

0
Query Fetch Types in PDO

php

0
PDO Database Connection

sql

0
Duplicate Table Into New Table

jquery

0
Scroll To Position

php

0
Cacheable Tweets

css

0
Mixins in LESS

css

0
Variables in LESS

php

0
Serialize and Unserialize Array

html

0
Viewport Meta Tag For Mobile

javascript

0
Prompt For User Input

css

0
Minify CSS On The Fly

php

0
cURL

jquery

0
Element Is Not

php

0
Specify Decimal Places

php

0
Page Last Modified

php

0
Add Month or Year to Date

javascript

0
OnClick Function

php

0
Embed Images With Data URIs

php

0
Conditional Vs Ternary

php

0
Loop Between Date Range

css

0
CSS3 Animation

css

0
CSS3 Transitions

sql

0
Return Row Count

jquery

0
Filter Table Results

css

0
Box Shadow

shell

0
Dividing The Dock In OSX

php

0
Remove Value From Array

jquery

0
Select Where Attribute Is

server

0
Set Timezone

jquery

0
FadeIn Image When Loaded

php

0
Leading Zeroes

jquery

0
Toggle Password Characters

php

0
Width and Height of SWF

sql

0
Add 1 To Number In Field

html

0
Get Site Favicon

javascript

0
HTML5 Desktop Notifications

php

0
Create an ICS file

css

0
Full Screen Background Image

css

0
CSS3 Attribute Selectors

php

0
Current File Name

php

0
Delete File From Server

php

0
Highlight Search Keyword

server

0
Force or remove www from URL

jquery

0
Check If Element Exists

css

0
Multiple Background

html

0
Phone and SMS Prefixes

sql

0
Date of Birth to Age

jquery

0
Disable Right Click Context Menu

css

0
Cross Browser Opacity

php

0
Flickr Photo Search API

server

0
Optimise Site Using DEFLATE

html

0
HTML5 Audio Tag

javascript

0
Popup Window

css

0
Target By Attribute

server

0
Error Document

html

0
Hide Broken Image Icon

javascript

0
Random Colour

php

0
Encode & Decode JSON

php

0
SimpleXML

css

0
Using RGBa

javascript

0
Detect CSS Property

jquery

0
Hover Animations

html

0
RSS Structure

css

0
Append Ellipsis To Long Text

css

0
Target Nth Child in CSS

server

0
Clean URLs

javascript

0
Client Location From Google

html

0
Conditional IE Statements

php

0
Mail in PHP

css

0
Device and Size Detection

sql

0
New Table in MySQL

css

0
CSS Greater Than Sign

jquery

0
ID Is Like

php

0
Email Using PHPMailer

php

0
ZipArchive in PHP

html

0
Full Table Structure

jquery

0
Wordpress Login Shake

jquery

0
TextArea Remaining Characters

php

0
GD Image Filters

javascript

0
iOS and Android Detection

jquery

0
Fixed Position on Scroll

php

0
Multiples Of

html

0
Useful HTML Character Entities

php

0
Generate Random Password

jquery

0
Simple AJAX Using jQuery

shell

0
Show Hidden Files on Mac

html

0
Favicons

javascript

0
Restrict Input to Numbers

jquery

0
setInterval Function

php

0
Twitter Timeline API Results

jquery

0
Smooth Scroll To Top

php

0
Time Ago Function

css

0
Text Emboss Technique

server

0
301 Redirect

php

0
Convert Twitter Links To URLs

jquery

0
Smooth Slide Toggle

css

0
Border Radius

php

0
PHP Range

php

0
Generate Random Colour

css

0
Embedding Fonts

css

0
Browser Selection Colour

html

0
Social Bookmark URLs

php

0
Date to Roman Numerals

php

0
Copyright Trick

php

0
Sorting an Array in PHP

jquery

0
Calculate Lighter Shade of RGB

sql

0
Inline MySQL Replace Statement