Skip to content. | Skip to navigation

Personal tools
Log in
Sections
You are here: Home

jorgenmodin.net - Blog

Extract a file with the dtrx command

Posted by admin |

dtrx in Linux tries to extract any archive. It asks questions that can be a bit tricky and confuses case when doing so, but it seems to work fine.'

 

Untar a File in Linux/Ubuntu - HostingAdvice.com

Nov 17, 2016 12:05

Starting supervisord on Ubuntu 16.04

Posted by admin |
# Make sure Supervisor comes up after a reboot.
sudo systemctl enable supervisor

# Bring Supervisor up right now.
sudo systemctl start supervisor

 


Read more: Link - supervisord - ubuntu server 16.04: cannot get supervisor to start automatically - Unix & Linux Stack Exchange

Nov 15, 2016 10:35

E-mail integration with chat, are there any good solutions?

Posted by admin |

I need to set up a chat for a group where some people would prefer to use their e-mail.  For these people, any mail message they send, it should immediately be posted to the chat channel. For all chats posted in the chat room, there should be options to send them out to the e-mail recepient:

  • Ever time a chat is posted
  • In digest form, every
    • hour, 3 hours, days, 3 days or every week

 

It turns out to be hard to find such a solution. I am currently looking at Fleep - A messenger for your teams and projects which is it's own chat, and at Email to Slack – MailClark, your team’s bot for external communicationsk for Slack. So far this is what i have found.

  • I have invited a gmail address to Fleep, but that invite does not seem to reach the fleep mobile client for that person
  • I have not found a setting in Mail Clark for chat digests

There is also something called Zapier which is more of a toolkit and does not seem to have , but so far I am seriously thinking of creating one myself, but alas I do not think I have the time.

Oct 31, 2016 04:55

How to increase the contrast of Firefox tabs

Posted by admin |

Apply this CSS somehow, for example through stylish:


.tabbrowser-tab .tab-label {     opacity: 1 !important;
  color: black !important;
  background-color: white; }




.tabbrowser-tab[pending], .alltabs-item[pending] {

    opacity: 1 !important;
  color: black !important;
  background-color: white;
 

}

 

If you use Stylish add this namespace line first:

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

I used Firefox - style of inactive or unloaded tabs - Themes and Skins for Browser - userstyles.org as a template.

Oct 21, 2016 04:10

Keeping the top left part of a video

Posted by admin |

ffmpeg  -i 20161019_171944.mp4 -qscale 0  -vf "crop=900:400:2000:600" cropped.mp4 0KB sq=    0B f=0/0

 

See more here: FFmpeg Filters Documentation

Oct 20, 2016 12:49

Beautiful Russian choir singing

Posted by admin |

Also featuring octavist (basso profondo) singing

 

https://www.youtube.com/watch?v=MEYwu9F-YHc

Oct 19, 2016 06:02

Some interesting stuff from the Seed studio site

Posted by admin |

GrovePi+ a Raspberry Pi hat that breaks out connectors for grove contacts. I think grove is basically a standard where you get power in conjunction with every pin on the development board. So it could be digital, analog and so on.

0.5 Inch OLED display Arduino shield for the Arduino micro form factor

Base Shield V2 A shield hat breaks out connectors for grove contacts. I think grove is basically a standard where you get power in conjunction with every pin on inthis case an Arduino or Arduino compatible. So it could be digital, analog and so on.

Screw Shield sturdier connections

Grove - Loudness Sensor

 

Oct 13, 2016 10:15

GraphQL: A new API standard

Posted by admin |

GraphQL | A query language for your API

Looks interesting, as an alternative to REST or JSON-RPC.

Oct 12, 2016 01:26

How to convert a Google document into a presentation with CSS

Posted by admin |

This trick uses pure CSS to make a Google document into a PDF slide presentation. Just export the doc to HTML and paste in the CSS code below.

What you will get

  • Title, heading 1 and heading 2 will be kept, and so will bulleted lists
  • Pretty much everything else gets hidden.
  • Each of title, heading 1 or heading 2 starts a new slide.
  • There will be a logo placed above each slide heading.

How to do it

Export your document to HTML

Open the HTML document and remove the style element inside the head element

Paste this style element in instead (it assumes your logo is in images/image00.png)

    <style type="text/css">
    p {
        display: none;
    }
    
    body {
        font-family: sans-serif;
    }
    
    p.title {
        display: block;
        font-weight: bold;
        font-size: 48px
    }
    
    
    @media print {
        h1,
        h2 {
            page-break-before: always;
            padding-top: 40mm
        }
        h1 {
            font-size: 42px
        }
        h2 {
            font-size: 36px
        }
        h1,
        h2 {
            background-image: url('./images/image00.png');
            background-repeat: no-repeat;
            background-position: left top
        }
    }
    </style>

 

Open the html file in e.g. Google Chrome

Open print dialog

Make sure "Background graphics" is ticked if you are using Google Chrome

Print to PDF

Open PDF in PDF viewer

Choose Presentation mode

Oct 10, 2016 05:40

Hobbyist hardware for sensors, automation, smart devices, secure computing

Posted by admin |

As a hobbyist as you are thinking of little projects to make, you start thinking about what is the right tool for the job: A Raspberry Pi, an Arduino, a Teensy, some kind of dedicated module?

I am not that experienced a hobbyist yet, but below I have tried to break down into four categories what categories my project plans or occasional actual project, tend to to end up in:

  • Wireless sensor
  • Smart device
  • Home automation
  • Secure computing

Wireless sensor

Characteristics:

  • Should last on a battery for at least a year
  • Should communicate wirelessly

Solutions:

  • Arduino-compatible low power chip with lots of power saving features switched on, paired with Bluetooth LE
  • TI's SensorTag, can communicate via Bluetooth LE, 6LoWPAN or ZigBee

Examples:

  • A humidity sensor for keeping indoor air from being to dry
  • Sensor to control a fan in a bathroom

Smart device

Characteristics:

  • Can measure things, move things (actuators) and interact via a display with a user

Solutions:

  • Use an Android phone, it has built in Bluetooth, Wi-Fi, 3G, USB and a battery backup. Takes a whole lot of work to get that with discrete parts. Sometimes the headphone output can control a servo. otherwise put an amplifier there or use an USB OTG cable and firmata.

Examples:

  • A bitcoin triggered lock box

Home automation

Characteristics:

  • Can measure, control and communicate to the Internet

Solutions:

  • Use a laptop connected with an Arduino or similar connected to it via USB. The laptop has built in battery backup and Internet connectivity + keyboard and a display
  • Use an Android phone

Examples:

  • Automation of watering house plants

Secure computing

Characteristics:

  • Encrypt stuff, sign stuff, safeguard stuff

Solutions

  • Use something like a Teensy3.5/3.6 or similar that has a cryptographic co-processor. An Arduino might suffice if you're doing simple things such as just inputting or outputting characters

What about the Raspberry Pi?

Interestingly enough the Raspberry Pi never featured in this when I started thinking about it. Capricious shutdowns may corrupt it's SD card which could take the system out of commission. It takes a number of additional components to make it have a rechargeable battery and a display. There are attempts to run Pis on their bare metal but it's hard to get good documentation on how the hardware works on that level apparently. It seems to work well for home entertainment though.

Oct 02, 2016 02:20
Ads