Skip to content

Instantly share code, notes, and snippets.

View dmarcelino's full-sized avatar

Dário dmarcelino

  • AppsCot
  • Lisbon, Portugal
View GitHub Profile
dmarcelino / .bashrc
Last active September 30, 2020 07:37 — forked from marioBonales/.bashrc
Custom .bashrc for ubuntu with git and kubernetes support
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
plembo /
Last active May 21, 2024 14:50
Calibre Server on Linux

Calibre Server on Linux


Calibre is a powerful cross-platform, open source, ebook manager and editing platform. Its calibre-server component can be used to publish an e-book library on a local network. While you can launch calibre-server as a desktop application, it can also be run as a daemon on a headless Linux server.

This tutorial on setting up calibre-server using Ubuntu 14.04 is very good, but dated.

let child = require("child_process")
let source_map = require("source-map")
let SourceMapConsumer = source_map.SourceMapConsumer
let path = require("path")
var crypto = require('crypto');
module.exports = function(source, sourceMap) {
var self = this
adcar /
Last active April 27, 2024 00:27
Tutorial: Setup Arch Linux Arm and Kodi on a Raspberry Pi (With a host machine running Linux)

Tutorial: Set up Arch Linux Arm + Kodi on a Raspberry Pi (With a host machine running Linux)

This tutorial will show how to, step by step, setup Arch Linux Arm and configure Kodi on a Raspberry Pi 3 Model B. Your host computer must be running Linux for this tutorial.


  • Raspberry Pi 3 Model B
  • 5V 2.1A Micro-usb Power Supply
  • Micro sdcard (I'd recommend at least 16GB)
  • USB Keyboard (for initial setup)
  • HDMI Cable
  • TV or Monitor with HDMI input
johanndt /
Last active July 15, 2022 12:35 — forked from dideler/
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu


Install Postgres 9.5, and then:

sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
ludoo0d0a / gist:8d0cfd1cab22598cb5d8
Created June 11, 2015 18:54
Synology boot locked
Sometimes after a hard reboot (power cut), if your synology cannot be logged in with DSM and it shows "System is getting ready. Please log in later" , please do these steps :
#Admin login via ssh
> synobootseq --set-boot-done
> synobootseq --is-ready
> /usr/syno/etc/rc.d/ start
> /usr/syno/etc/rc.d/ start

Publishing an NPM package

Here's what I do when I publish an NPM package.

1: Make sure you're up to date

I always like to check what's going on in a repo before I do anything:

elwinar / clip
Created February 13, 2015 09:03
Shortcut to pipe from and to clipboard using xclip
# Linux version
# Use this script to pipe in/out of the clipboard
# Usage: someapp | clip # Pipe someapp's output into clipboard
# clip | someapp # Pipe clipboard's content into someapp
if command -v xclip 1>/dev/null; then
if [[ -p /dev/stdin ]] ; then
mathiasrw / True Trello Printer
Last active February 27, 2024 21:21
Ever wanted to print your Trello board? Export as JSON and paste it into the code.
<!DOCTYPE html>
<meta charset="UTF-8">
<title>True Trello Printer</title>
<link href="" rel="stylesheet">
davewongillies / Serving Django apps behind SSL with
Last active August 28, 2022 17:31 — forked from aj-justo/gist:3228782
Serving Django apps behind SSL with Nginx

Configuring Nginx to serve SSL content is straight forward, once you have your certificate and key ready:

server { 
    listen 443 default ssl;
    root /path/to/source;
    server_name mydomain;

    ssl_certificate      /path/to/cert;
    ssl_certificate_key  /path/to/key;