Skip to content

Instantly share code, notes, and snippets.

View debiprasad's full-sized avatar

Debiprasad Sahoo debiprasad

View GitHub Profile
@debiprasad
debiprasad / bevy-waitlist-count.md
Last active November 8, 2022 18:52
Bevy - JavaScript to count people on the waitlist

People on the waitlist (includes accepted/ticket released, excludes expired)

document.querySelectorAll('tr.list-item:not(.WaitListView-WaitListView-claimed-3kM9t):not(.WaitListView-WaitListView-expired-2IkU9)').length

People on the waitlist (excludes accepted/ticket released, excludes expired)

document.querySelectorAll('tr.list-item:not(.WaitListView-WaitListView-claimed-3kM9t):not(.WaitListView-WaitListView-expired-2IkU9)').length - document.querySelectorAll('.icon-hourglass-3').length
@debiprasad
debiprasad / gruntfile.js
Last active June 20, 2017 11:08 — forked from pocketjoso/gruntfile.js
Critical css for PHP sites using grunt-penthouse (could use Penthouse's node module to exact same effect)
// gruntfile.js
-----------------------
// make sure you're actually running a php server locally first!
// Output a critical css file in same folder with same name as php file, just add '.css' extensions
// This makes it super easy to find from php.
penthouse: {
extract : {
css : 'pathToMyFullCss.css',
url : 'localhost:8000/work/index.php',
outfile : 'work/index.php.css',
@debiprasad
debiprasad / .php_cs
Last active May 9, 2017 06:24
Recommended configuration file for PHP Coding Standards Fixer (FriendsOfPHP/PHP-CS-Fixer) for Laravel projects. This is designed for version 2.x of FriendsOfPHP/PHP-CS-Fixer and does not work for 1.x version.
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('public')
->exclude('vendor')
->exclude('storage')
->exclude('app')
->exclude('bootstrap')
->exclude('tests')
->notPath('server.php')
@debiprasad
debiprasad / display-bootstrap-tab-url-hash.js
Last active September 9, 2015 08:04 — forked from anonymous/custom.js
Opens a tab other than the active tab, when the page loads using the hash in the URL. Useful, if using Bootstrap tabs.
if (location.hash) {
var hashId = location.hash;
if ($('a[href="' + hashId + '"]').length > 0) {
$('a[href="' + hashId + '"]').click();
}
}