Skip to content

Instantly share code, notes, and snippets.

View singhenso's full-sized avatar

Gagandeep Singh singhenso

View GitHub Profile
@singhenso
singhenso / WordPress function to automatically add ALT tags to images on upload WordPress function to automatically add ALT tags to images on upload based off of the file name.
// WordPress function to automatically
// add ALT tags to images on upload.
function alt_tag_adder( $post_ID ) {
if ( wp_attachment_is_image( $post_ID ) ) {
$tc_title = get_post( $post_ID )->post_title;
$tc_title = preg_replace( '%\s*[-_\s]+\s*%', ' ', $tc_title );
$tc_title = ucwords( strtolower( $tc_title ) );
$tc_meta = array(
'ID' => $post_ID,
alexcvzz.vscode-sqlite
andys8.jest-snippets
apollographql.vscode-apollo
austincummings.razor-plus
bobsparadox.seti-black
BriteSnow.vscode-toggle-quotes
christian-kohler.npm-intellisense
christian-kohler.path-intellisense
CoenraadS.bracket-pair-colorizer
dbaeumer.vscode-eslint
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew cask install iterm2
# update iterm2 settings -> colors, keep directory open new shell, keyboard shortcuts
brew install bash # latest version of bash
# set brew bash as default shell
brew install fortune
brew install cowsay
brew install git
[
{"Year":"2018","Make":"Cadillac","Model":"CT6","Styling":"6","Acceleration":"4","Handling":"5","Fun Factor":"4","Cool Factor":"4","Weekend Score Total":"23","Features":"9","Comfort":"8","Quality":"8","Practicality":"5","Value":"7","Daily Score Total":"37","Total Score":"60","Video Link":"23:47","Filmed At City":"Tustin","Filmed At Country":"California","Vehicle Country":"USA","id":117},
{"Year":"2018","Make":"Bugatti","Model":"Chiron","Styling":"9","Acceleration":"10","Handling":"9","Fun Factor":"10","Cool Factor":"10","Weekend Score Total":"48","Features":"6","Comfort":"5","Quality":"7","Practicality":"1","Value":"6","Daily Score Total":"25","Total Score":"73","Video Link":"35:06","Filmed At City":"Toronto","Filmed At Country":"Ontario","Vehicle Country":"France","id":1},
{"Year":"2019","Make":"BMW","Model":"i8 Roadster","Styling":"7","Acceleration":"7","Handling":"7","Fun Factor":"6","Cool Factor":"7","Weekend Score Total":"34","Features":"7","Comfort":"6","Quality":"7","Practicality":"2","Value":"6
patbenatar.advanced-new-file
formulahendry.auto-close-tag
formulahendry.auto-rename-tag
fosshaas.fontsize-shortcuts
BriteSnow.vscode-toggle-quotes
Zignd.html-css-class-completion
christian-kohler.npm-intellisense
christian-kohler.path-intellisense
octref.vetur
dbaeumer.vscode-eslint
@singhenso
singhenso / media-queries.scss
Created July 10, 2017 18:04 — forked from chrisl8888/media-queries.scss
All Media Queries breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
@singhenso
singhenso / media-queries.scss
Created July 10, 2017 18:04 — forked from chrisl8888/media-queries.scss
All Media Queries breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }