Skip to content

Instantly share code, notes, and snippets.

View rajilesh's full-sized avatar
🏠
Working from home

Rajilesh Panoli rajilesh

🏠
Working from home
View GitHub Profile
<html>
<head>
<script>
document.addEventListener("DOMContentLoaded", function() {
var canvas = document.createElement('canvas');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
document.body.appendChild(canvas);
@rajilesh
rajilesh / install-chrome-headless.sh
Created June 15, 2022 15:42 — forked from ipepe/install-chrome-headless.sh
Installing headless chrome on Ubuntu.
#!/bin/bash
# from https://chromium.woolyss.com/
# and https://gist.github.com/addyosmani/5336747
# and https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:canonical-chromium-builds/stage
sudo apt-get update
sudo apt-get install chromium-browser
chromium-browser --headless --no-sandbox http://example.org/
{
"data": [{ "id": 102, "url": "unlimited-live-basic-english-classes-onlineaa" },
{ "id": 111, "url": "unlimited-live-basic-english-classes-onlinebb" }]
}
<?php
define( 'DISALLOW_FILE_EDIT', true );
define( 'DISALLOW_FILE_MODS', true );
define( 'WP_AUTO_UPDATE_CORE', false );
define('DISALLOW_FILE_MODS', true);
define( 'AUTOMATIC_UPDATER_DISABLED', true );
Better Comments
https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments
GitLens — Git supercharged
https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens
Git History
https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory
Bracket Pair Colorizer 2
.disable_user {
position:relative;
width:30px;
height:14px;
display:inline-block;
overflow:hidden;
background:#392b96;
text-indent:999px;
border-radius:10px;
jQuery('.event_secondbanner .open-next-table').each(function(){
var th = $(this);
th.click(function(){
if(th.hasClass('active_row')){
$('.event_secondbanner .open-next-table').removeClass('active_row');
// hide all details rows
$('.ediatble-table').hide();
<?php
// Add role class to body
function jb_add_role_to_body($classes) {
if (is_user_logged_in()) {
foreach (wp_get_current_user()->roles as $user_role) {
$classes[] = 'role-'. $user_role;
}
}
return $classes;
$args['show_in_rest'] = true; in register_taxonomy args