Skip to content

Instantly share code, notes, and snippets.

Written by Thanos Apostolou
http://askubuntu.com/questions/53822/how-do-you-run-ubuntu-server-with-a-gui
Some more info can be found here https://help.ubuntu.com/community/ServerGUI. I assume you start with a clean install of Ubuntu Server 16.04 (some modifications may be needed for older versions of Ubuntu). Depending on your needs you can do these:
Minimal GUI:
sudo apt install xorg
sudo apt install --no-install-recommends openbox
Run the command startx and openbox will start (you can open a terminal there and run any application you want)
@cmpscabral
cmpscabral / cr2tojpeg
Last active July 6, 2022 18:43
convert RAW/CR2 to JPEG / resize
# convert raw to jpeg
for i in *.CR2; do sips -s format jpeg $i --out "${i%.*}.jpg"; done
# resize jpegs
for i in *.jpg; do sips -Z 2500 $i --out "./small/${i%.*}.jpg"; done
# convert to tiff with lzw compression
sips -s format tiff -s formatOptions lzw [file] --out [file]
# convert to jpeg lossless
/* global __DEV__ */
import React, { useState, useEffect, useRef } from "react"
import {
facebookAppId,
facebookDisplayName,
iosOneSignalAppId,
androidOneSignalAppId,
sentryDsn,
} from "./app.json"
import { version } from "./package.json"
@cmpscabral
cmpscabral / mysqldump.sh
Created July 21, 2015 21:46
mysql dump to tar.gz
mysqldump mydatabase -u root -p | gzip -c | cat > mydatabase-$(date +%Y-%m-%d-%H.%M.%S).sql.gz
function hostReachable() {
// Handle IE and more capable browsers
var xhr = new ( window.ActiveXObject || XMLHttpRequest )( "Microsoft.XMLHTTP" );
var status;
var server = window.location.hostname;
if (window.location.port != '') {
server += ':'+window.location.port;
}
@cmpscabral
cmpscabral / download.php
Last active April 11, 2021 22:39
on the fly zip stream download
<?php
//
// taken from http://stackoverflow.com/questions/4357073/on-the-fly-zipping-streaming-of-large-files-in-php-or-otherwise
//
// make sure to send all headers first
// Content-Type is the most important one (probably)
//
header('Content-Type: application/octet-stream');
header('Content-disposition: attachment; filename="file.zip"');
@cmpscabral
cmpscabral / install_libxl_php5.6.sh
Created March 11, 2021 19:37 — forked from dyazincahya/install_libxl_php5.6.sh
Package command for install libxl in ubuntu 16.04
#!/bin/bash
#
# Modify by k4ng
#
# ilia/php_excel extension example install script
#
# usage:
# > sudo ./install_phpexcel_php5.6.sh
# > (optionally) sudo service php5.6-fpm restart
#
@cmpscabral
cmpscabral / adding-pixel-to-raspbian-lite.md
Created November 1, 2020 22:19 — forked from kmpm/adding-pixel-to-raspbian-lite.md
Adding PIXEL to Raspbian Lite

Adding PIXEL/GUI to Raspbian Lite

These 'notes' were primarily intended for my own consumption but since there have been surprisingly many comments to it over the years I wanted to do some updates and clarifications. Thanks for all comments.

These instructions will require you to have connection to internet from your pi, WiFi, Ethernet or by some other means like a 3G USB dongle or something.

Preparations

@cmpscabral
cmpscabral / quasar android
Last active June 24, 2020 22:33
quasar_android.md
# Install graddle
Download the Gradle Binary Only Distribution from https://gradle.org/gradle-download/
Open a terminal
Run the following to unzip the android sdk to the Development directory that is under your user home directory
unzip ~/Downloads/gradle-3.1-bin.zip -d ~/Development
Open up the vi editor and edit your bash profile. We need to add in the GRADLE_HOME environment variable
@cmpscabral
cmpscabral / pass-slots.md
Created June 8, 2020 11:52 — forked from loilo/pass-slots.md
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {