Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Piyush Bansal piyush1104

:octocat:
  • 100ms
  • Bharatpur, Rajasthan
View GitHub Profile
@piyush1104
piyush1104 / install-xcode-command-line-tools.sh
Created Sep 30, 2021 — forked from phuctm97/install-xcode-command-line-tools.sh
🔨 Install Xcode Command Line Tools and wait until it's done
View install-xcode-command-line-tools.sh
#!/bin/bash
# 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;
done
@piyush1104
piyush1104 / WSLWindows10Setup.md
Created Aug 22, 2021 — forked from AjkayAlan/WSLWindows10Setup.md
Windows SubSystem For Linux setup that I like with some developers stuff mixed in
View WSLWindows10Setup.md

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 - https://www.microsoft.com/store/apps/9N9TNGVNDL3Q)

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

  4. Update and upgrade

sudo apt-get update
@piyush1104
piyush1104 / osx_defaults.sh
Created Jun 15, 2021 — forked from vraravam/osx_defaults.sh
OSX Defaults to setup a brand new machine
View osx_defaults.sh
#!/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
##
View 1.js
export function animationInterval(ms, signal, callback) {
const start = document.timeline.currentTime;
function frame(time) {
if (signal.aborted) return;
callback(time);
scheduleFrame(time);
}
function scheduleFrame(time) {
@piyush1104
piyush1104 / README.md
Created Nov 13, 2020 — forked from int128/README.md
Watching build mode on Create React App
View README.md

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
piyush1104 / .php_cs.dist
Last active May 17, 2020 — 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
<?php
require_once __DIR__.'/PrettierPHPFixer.php';
$finder = PhpCsFixer\Finder::create()
->exclude('somedir')
->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php')
->in(__DIR__)
;