Skip to content

Instantly share code, notes, and snippets.

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

Arun arunkumr

🏠
Working from home
  • Cognizant
  • Chennai
View GitHub Profile
@arunkumr
arunkumr / LessCSSGrid.less
Created April 10, 2022 09:52
Less Scripts that i frequently use as part of my projects.
/*
Sample Usage:
@import "grid.less";
.gauge
{
.make-grid(@sm,1,4); --Used for Responsive Styles
.make-grid(1,2); --Used for Non-Responsive Styles that can be used with Older Browsers and Mobile Screens.
}
*/
@arunkumr
arunkumr / LaptopMaxChargeThreshold.sh
Last active January 6, 2021 15:22
My-Linux-Commands
#From https://askubuntu.com/a/1230442/1168126
echo 60 | sudo tee /sys/class/power_supply/BAT0/charge_control_end_threshold
#Add to /etc/crontab using sudo gedit /etc/crontab
@reboot root echo 60 > /sys/class/power_supply/BAT0/charge_control_end_threshold
Sub UnMergeFill()
Dim cell As Range, joinedCells As Range
For Each cell In ThisWorkbook.ActiveSheet.UsedRange
If cell.MergeCells Then
Set joinedCells = cell.MergeArea
cell.MergeCells = False
joinedCells.Value = cell.Value
End If
@arunkumr
arunkumr / getAllElementsWithAttribute
Created July 1, 2015 09:32
Used to get all elements based on availability of attribute name.
function getAllElementsWithAttribute(d,parent) {
for (var c = [], b = parent.getElementsByTagName("*"), a = 0, e = b.length;a < e;a++) {
null !== b[a].getAttribute(d) && c.push(b[a]);
}
return c;
}
var oldXHR = XMLHttpRequest.prototype.send;
XMLHttpRequest.prototype.send = function () {
//Insert code to run when new XHR request is created
XHRCreated();
oldXHR.apply(this, arguments);
var oldReadSta = this.onreadystatechange;
this.onreadystatechange = function () {
oldReadSta.apply(this, arguments);