Skip to content

Instantly share code, notes, and snippets.


Saadh Shehzed inoicouldalwaysturn2u

Block or report user

Report or block inoicouldalwaysturn2u

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
inoicouldalwaysturn2u / javascript-nested-ternary-vs-switch-case.js
Last active Jul 5, 2019
Javascript nested ternary vs switch case. Which is better?
View javascript-nested-ternary-vs-switch-case.js
# Easier to copy paste from what I was doing. Working on a React Component.
# Was working with React and d3. So the functions are imported from d3.
import { axisTop, axisRight, axisBottom, axisLeft } from 'd3-axis';
# Ternary example as a small function
ternaryEx = ( bootstrap ) => bootstrap === 'top' ? axisTop :
bootstrap === 'right' ? axisRight :
bootstrap === 'bottom' ? axisBottom :

Keybase proof

I hereby claim:

  • I am inoicouldalwaysturn2u on github.
  • I am chase_ats ( on keybase.
  • I have a public key ASDnT4Kj1NyrLglQz8Un2DUb84JO8U_MJ8Pxbp3Qv5oB0go

To claim this, I am signing this object:

View shop-css-overwrite.css
.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product-img-wrapper {
float: none !important;
width: 100% !important;
.shopify-buy__product-img-wrapper {
float: none !important;
width: 100% !important;
View Shazam all songs to youtube and spotify.js
// change this variable to change timeout for async scroll load
var TIMEOUT_IN_MS = 1000
// script from
// start from
// print all shazam songs loaded on the page
// TODO: Change format to JSON
function printShazamSongs(){
var artist = $(this).find(".artist meta").attr("content");
inoicouldalwaysturn2u / launchd-script-to-keep-macos-app-running-at-all-times.plist
Last active May 3, 2017
Launchd script to keep a macOS app to always run even if it closes randomly (issue I'm having from crashes). Place in ~/Library/LaunchAgents and run <code>launchctl load ~/Library/LaunchAgents/FILENAME.plist</code>
View launchd-script-to-keep-macos-app-running-at-all-times.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
# Turn off spotlight.
sudo mdutil -a -i off
# Remove the index files.
sudo rm -rfv /.Spotlight-V100
# Turn on spotlight.
sudo mdutil -a -i on
inoicouldalwaysturn2u / disable-reopening-apps-windows-MacOS-modern-versions-post-Lion
Last active Apr 12, 2017
Disables the reopening of applications and windows for modern MacOS versions. For some reason on the latest Sierra patch, my apps and windows are reopening.
View disable-reopening-apps-windows-MacOS-modern-versions-post-Lion
# curl -L -s -o ~/.local/bin/
# chmod +x ~/.local/bin/ && sudo ~/.local/bin/ ; rm ~/.local/bin/
echo "#!/bin/bash" > /tmp/
echo "rm /Users/*/Library/Preferences/ByHost/*" >> /tmp/
mv /tmp/ /usr/local/bin/
chmod +x /usr/local/bin/
defaults write LoginHook /usr/local/bin/
inoicouldalwaysturn2u / wget
Created Mar 18, 2017 — forked from bueckl/wget
Wget examples
View wget
#Spider Websites with Wget – 20 Practical Examples
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute.
1. Download a single file from the Internet
2. Download a file but save it locally under a different name
wget ‐‐output-document=filename.html
View youtube api video category id list
2 - Autos & Vehicles
1 - Film & Animation
10 - Music
15 - Pets & Animals
17 - Sports
18 - Short Movies
19 - Travel & Events
20 - Gaming
21 - Videoblogging
22 - People & Blogs
# because I'll already have a chromedriver installed
sudo mv -f /usr/local/bin/chromedriver /usr/local/bin/chromedriver-old
sudo apt-get install unzip &&
a=$(uname -m) &&
rm -r /tmp/chromedriver/
mkdir /tmp/chromedriver/ &&
wget -O /tmp/chromedriver/LATEST_RELEASE &&
if [ $a == i686 ]; then b=32; elif [ $a == x86_64 ]; then b=64; fi &&
latest=$(cat /tmp/chromedriver/LATEST_RELEASE) &&
wget -O /tmp/chromedriver/ ''$latest'/chromedriver_linux'$b'.zip' &&
You can’t perform that action at this time.