Skip to content

Instantly share code, notes, and snippets.

View pfrandsen's full-sized avatar

Peter Frandsen pfrandsen

View GitHub Profile
@pfrandsen
pfrandsen / deposelect.js
Created August 15, 2016 06:23
Make text selectable in Depo (internal tool)
(function() {
for (let elem of document.getElementsByClassName("no-select")) {
elem.classList.remove("no-select");
}
})();
@pfrandsen
pfrandsen / gript-karma-loglevel.md
Created July 12, 2016 11:22
Setting karma logLevel in Gript

Add a karma section to gulp.confin in you main Gulp file (gulpfile.js) and use a string to set the log level ("INFO", "DEBUG", ...):

karma: {
    logLevel: "DEBUG"

}

  • git checkout master
  • git pull
  • git checkout branch
  • git merge master

To debug minified JavaScript in Chrome DevTools do the following:

  1. Open DevTools (ctrl-shift-i)
  2. Open source tab
  3. Select source file
  4. Click {} in the lower left corner of the source window
  5. Set breakpoint(s) and start debugging
@pfrandsen
pfrandsen / Ubuntu-snappy-core-hostname.md
Last active December 26, 2015 12:40
Change hostname in Ubuntu snappy core

Change hostname in Ubuntu snappy core

Edit hostname and hosts files, then reboot device

edit hostname file

sudo vi /etc/hostname

  1. Press D to delete the current name (D = delete line)
  2. Press i to enter insert mode
  3. Write the new host name
  4. Press <esc>:wq<enter> to save file and exit vi
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;