Skip to content

Instantly share code, notes, and snippets.


Arvin Singla arvinsingla

View GitHub Profile
gspivey /
Created Dec 3, 2021
Parameterized steps for creating a fling ISO for ESXi

Parameterized steps for creating a fling ISO for ESXi

Powershell Permissions

List Execution Policies Get-ExecutionPolicy -List Set Excecution Policy (Requires Running terminal as Admministrator) Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope LocalMachine Return Excecution Policy (Requires Running terminal as Admministrator) Set-ExecutionPolicy -ExecutionPolicy Restricted -Scope LocalMachine

codediodeio / database.rules.json
Last active Nov 21, 2022
Common Database Rules for Firebase
View database.rules.json
// No Security
"rules": {
".read": true,
".write": true
Arjeno / circle.yml
Created Aug 17, 2016
Always use the latest version of Chrome on CircleCI
View circle.yml
# This makes sure Chrome is always up to date in your test suite
# On average this adds about 10 seconds to your build suite
# Be sure to use Ubuntu 14.04 (Trusty) in the CircleCI's OS setting (Settings > Build Environment)
- curl -L -o google-chrome.deb
- sudo dpkg -i google-chrome.deb
- sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome
- rm google-chrome.deb
bastman /
Created Mar 31, 2016
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

paulirish /
Last active Nov 30, 2022
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
DanHerbert /
Last active Oct 19, 2022
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

READ THIS Very Important Update

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

CMCDragonkai /
Last active Nov 8, 2022
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
jhedstrom / FeatureContext.php
Last active Apr 5, 2019
Step-definition for complex node structure (field collection + entity reference).
View FeatureContext.php
* @Given /^I am viewing a product with the following related products:$/
public function assertRelatedProducts(TableNode $relatedProducts) {
// First, create a product.
$product = (object) array(
'title' => 'Parent Product',
'type' => 'product',
'uid' => 1,
nblumoe / angularjs_resource_tokenhandler.js
Created Jul 5, 2012
AngularJS service to send auth token with $resource requests
View angularjs_resource_tokenhandler.js
.factory('TokenHandler', function() {
var tokenHandler = {};
var token = "none";
tokenHandler.set = function( newToken ) {
token = newToken;
tokenHandler.get = function() {
return token;