Blog Spot!


Reconfigure the audio ports on linux

Install:

sudo apt-get install alsa-tools-gui

Run:

hdajackretask

askubuntu-01
askubuntu-02

Added on 29.Nov.2016
Tags: linux audio ports hdajackretask

How To Disable OneDrive / SkyDrive With Just A Few Clicks In Windows 8.1 Pro

  1. To launch Windows’ Group Policy Editor, bring up a Run prompt (Windows key + R) and type in “gpedit.msc” before pressing Enter.

  2. The Group Policy Editor will launch, and from here you’ll need to navigate through the left-hand folder tree to Computer Configuration\Administrative Templates\Windows Components.

  3. Double-clicking on the SkyDrive folder.

  4. Double-click on “Prevent the usage of SkyDrive for file storage“.

  5. Here, you want to change the selection from “Not Configured” to “Enabled“. The language is a bit tricky, so be sure that you’re enabling it and not disabling it. You’re enabling the prevention of SkyDrive, not disabling SkyDrive.

  6. Apply your changes and SkyDrive will no longer be active on your system. You can check that the process (SkyDrive.exe) is not running. You can also check your system tray to see that the icon has been removed. Finally, you can see in Windows Explorer that there is no longer a tree of SkyDrive folders on the left-hand side. You are now free of SkyDrive!

disable-onedrive-skydrive-win8.1-pro

Added on 21.Nov.2016
Tags: onedrive disable win8 how-to

Commit only part of a file in GIT

You can use git add --patch filename.x (or -p for short), and git will begin to break down your file into what it thinks are sensible "hunks" (portions of the file). It will then prompt you with this question:

Stage this hunk [y,n,q,a,d,/,j,J,g,s,e,?]?

Here is a description of each option:

  • y stage this hunk for the next commit
  • n do not stage this hunk for the next commit
  • q quit; do not stage this hunk or any of the remaining hunks
  • a stage this hunk and all later hunks in the file
  • d do not stage this hunk or any of the later hunks in the file
  • g select a hunk to go to
  • / search for a hunk matching the given regex
  • j leave this hunk undecided, see next undecided hunk
  • J leave this hunk undecided, see next hunk
  • k leave this hunk undecided, see previous undecided hunk
  • K leave this hunk undecided, see previous hunk
  • s split the current hunk into smaller hunks
  • e manually edit the current hunk
  • ? print hunk help

stackoverflow

Added on 15.Nov.2016
Tags: git commit file

Efficient way to clone an object in JavaScript

What is the most efficient way to clone an object in JavaScript?

ES6 (not deep-clone)

var obj2 = Object.assign({}, obj)

Vanilla (deep-clone)

/**
 * Simple object clone function.
 * Copies primitive types, objects and arrays.
 */
function cloneObject(o) {
    if (typeof o !== 'object' || o === null) return o;

    let out = Array.isArray(o) ? [] : {};

    for (let k in o) {
        out[k] = (typeof o[k] === "object" && o[k] !== null)
            ? cloneObject(o[k])
            : o[k];
    }

    return out;
}

Else Check this links!

jsben
stackoverflow

Added on 19.Oct.2016
Tags: js clone object

Vanilla JavaScript events

//Listen for the event
window.addEventListener("MyEventType", function(evt) {
    alert(evt.detail);
}, false);

//Dispatch an event
var evt = document.createEvent("CustomEvent");
evt.initCustomEvent("MyEventType", true, true, "Any Object Here");
window.dispatchEvent(evt);

stackoverflow

Update: 2018-04-02

  • this looks deprecated - MDN

Added on 07.Oct.2016
Tags: js events

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