Skip to content

Instantly share code, notes, and snippets.


Piyush Bansal piyush1104

View GitHub Profile
piyush1104 /
Created September 30, 2021 16:17 — forked from phuctm97/
🔨 Install Xcode Command Line Tools and wait until it's done
# Install XCode Command Line Tools.
xcode-select --install &> /dev/null
# Wait until XCode Command Line Tools installation has finished.
until $(xcode-select --print-path &> /dev/null); do
sleep 5;
piyush1104 /
Created August 22, 2021 06:09 — forked from AjkayAlan/
Windows SubSystem For Linux setup that I like with some developers stuff mixed in

Setting Up WSL

Install A Distro:

  1. Run the following in powershell as admin Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

  2. Install a distro (ex: Ubuntu 18.04 LTS -

  3. Open your distro you installed via the start menu, let it setup

  4. Update and upgrade

sudo apt-get update
piyush1104 /
Created June 15, 2021 06:34 — forked from vraravam/
OSX Defaults to setup a brand new machine
#!/usr/bin/env bash
# TODO: Need to figure out the settings for the following:
# 1) Dock: Items with order (not capturing binary data - since that is dependent on installed apps)
# 2) Security & Privacy Preferences: Full Disk Access, Camera, Microphone
# 3) Login items for my user (i.e. apps started when I login)
# 4) Retina displays scaling
# 5) Finder sidebar with order
piyush1104 / 1.js
Created February 11, 2021 17:23 — forked from jakearchibald/1.js
View 1.js
export function animationInterval(ms, signal, callback) {
const start = document.timeline.currentTime;
function frame(time) {
if (signal.aborted) return;
function scheduleFrame(time) {
piyush1104 /
Created November 13, 2020 08:32 — forked from int128/
Watching build mode on Create React App

Create React App does not provide watching build mode oficially (#1070).

This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.

How to Use

Create a React app.

Put the script into scripts/watch.js.

piyush1104 / .php_cs.dist
Last active May 17, 2020 07:08 — forked from Billz95/.php_cs.dist
A Customised fixer for PHP-CS-Fixer to use `prettier`'s php plugin to pre-process the code before getting analysed by other fixers. This would enable `php-cs-fixer` to take advantage of `prettier`'s ability of managing long line.
View .php_cs.dist
require_once __DIR__.'/PrettierPHPFixer.php';
$finder = PhpCsFixer\Finder::create()