This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Need to complie chroot for DSM (support for official has been stopped), then install pi hole for debian. | |
Docker won't work for 6.2 DSM dor DSM 214 SE as no support of kernel 3.2.40 by docker. | |
Install pi-hole without webadmin, as php5 is obsolete and no PPA exist for it. | |
Compiling chroot guide: https://github.com/OKit-Scripts-Projects/DSM.Customizations/blob/master/How.to.compile.spk.md#How.to.compile.spk | |
Kernel name is armada370-6.1 for armhl for DSM 214 SE | |
Using chroot to install pi-hole guide: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script resizes the root partition of the phone, be careful. | |
set -xe | |
# needed for https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/373409 | |
echo "Resizing your root partition, this may take some time..." | |
echo "When done, it will REBOOT the device, make sure you're not losing any work!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pg_restore --no-owner --role=<role> -d <db_name> <db_name.dump> -h <host_name> -U <user> -n public | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function downloadCSV(){ | |
var csvContent = "data:text/csv;charset=utf-8,"; | |
var table = $('.table').children().children(); | |
var data = []; | |
for(i=0; i < table.length; i++) | |
{ | |
var row = $(table[i]).children(); | |
var temp = []; | |
for(j=0; j < row.length; j++){ | |
temp[j] = $(row[j]).text(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getTimeDiffAndPrettyText(oDatePublished) { | |
var oResult = {}; | |
var oToday = new Date(); | |
var nDiff = oToday.getTime() - oDatePublished.getTime(); | |
// Get diff in days | |
oResult.days = Math.floor(nDiff / 1000 / 60 / 60 / 24); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; |