Skip to content

Instantly share code, notes, and snippets.

Avatar
🍕

Arvin Singla arvinsingla

🍕
View GitHub Profile
@gspivey
gspivey / Fling_ISO_Creation.md
Created Dec 3, 2021
Parameterized steps for creating a fling ISO for ESXi
View Fling_ISO_Creation.md

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
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
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)
dependencies:
pre:
- curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.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
bastman / docker-cleanup-resources.md
Created Mar 31, 2016
docker cleanup guide: containers, images, volumes, networks
View docker-cleanup-resources.md

Docker - How to cleanup (unused) resources

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

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

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

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

@paulirish
paulirish / what-forces-layout.md
Last active Nov 30, 2022
What forces layout/reflow. The comprehensive list.
View what-forces-layout.md

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
DanHerbert / fix-homebrew-npm.md
Last active Oct 19, 2022
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew
View fix-homebrew-npm.md

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
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active Nov 8, 2022
JS: AngularJS Directive Attribute Binding Explanation
View angularjs_directive_attribute_explanation.md

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
jhedstrom / FeatureContext.php
Last active Apr 5, 2019
Step-definition for complex node structure (field collection + entity reference).
View FeatureContext.php
<?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
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;