Blog Spot!


How do I properly force a Git push?

Just do:

git push origin master --force

or if you have a specific repo:

git push https://git.... --force

may not be proper, but if anyone stumbles upon this page, thought they might want a simple solution...

Short flag

Also note that -f is short for --force, so

git push origin master -f

will also work.

stackoverflow

Added on 20.Nov.2015
Tags: force git push

How do you change brightness, color and sharpness from command line?

You all know about PWM Flickering:
Flickering
Monitor

Open your terminal and type this

xrandr -q | grep " connected"

it will gives you the output as LVDS1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 331mm x 207mm

There LVDS1 Stands for your display .

so now you have to do as

xrandr --output LVDS1 --brightness 0.5

there 0.5 stands for brightness and it ranges from 0.0 to 1.0 . 0.0 -> Full black .so you have to choose the required value of brightness.

askubuntu

Added on 11.Nov.2015
Tags: linux termina brightness flickering xrandr monitor

30 Useful php Libraries for developers

Really Useful!

30 Useful PHP

Added on 05.Nov.2015
Tags: php libraries

Check if empty object in JavaScript

// Speed up calls to hasOwnProperty
var hasOwnProperty = Object.prototype.hasOwnProperty;

function isEmpty(obj) {

    // null and undefined are "empty"
    if (obj == null) return true;

    // Assume if it has a length property with a non-zero value
    // that that property is correct.
    if (obj.length > 0)    return false;
    if (obj.length === 0)  return true;

    // Otherwise, does it have any properties of its own?
    // Note that this doesn't handle
    // toString and valueOf enumeration bugs in IE < 9
    for (var key in obj) {
        if (hasOwnProperty.call(obj, key)) return false;
    }

    return true;
}
isEmpty(""), // true
isEmpty([]), // true
isEmpty({}), // true
isEmpty({length: 0, custom_property: []}), // true

isEmpty("Hello"), // false
isEmpty([1,2,3]), // false
isEmpty({test: 1}), // false
isEmpty({length: 3, custom_property: [1,2,3]}) // false

stackoverflow

Added on 05.Nov.2015
Tags: js object empty check

Get size of array in C

int array[] = {5, 1, 3, -2, 6};
int size = sizeof(array) / sizeof(int);

Added on 04.Nov.2015
Tags: c array length

Search


PHP Libraries


Carbon lib / docs
Idiorm lib / docs
Image Workshop lib / docs
lorenzos/Minixed lib / docs
Parsedown lib / docs
PHP Paginator lib / docs
PHP Redis lib / docs
QrCode lib / docs
Requests lib / docs
Slim lib / docs
Spyc lib / docs
TWIG lib / docs
Upload lib / docs
Validation lib / docs
Zebra Image lib / docs

JS Libraries


AJV lib / docs
BackboneJS lib / docs
Bootstrap Notify lib / docs
C3.js lib / docs
ChartJS lib / docs
FastMD5 lib / docs
HighlightJS lib / docs
jQuery-Storage lib / docs
JS-Cookie lib / docs
Leaflet JS lib / docs
LowDB lib / docs
Marked lib / docs
NeedlyJS lib / docs
ParcelJS lib / docs
RequireJS lib / docs
Swig lib / docs
Toastr lib / docs
Underscore lib / docs
ValidateJS lib / docs
top