Skip to content

Instantly share code, notes, and snippets.

View SergeyKozlov's full-sized avatar

Sergey Kozlov SergeyKozlov

View GitHub Profile
@umpirsky
umpirsky / ubuntu-raid.sh
Last active April 15, 2024 00:53
Install Ubuntu on RAID 0 and UEFI/GPT system
# http://askubuntu.com/questions/505446/how-to-install-ubuntu-14-04-with-raid-1-using-desktop-installer
# http://askubuntu.com/questions/660023/how-to-install-ubuntu-14-04-64-bit-with-a-dual-boot-raid-1-partition-on-an-uefi%5D
sudo -s
apt-get -y install mdadm
apt-get -y install grub-efi-amd64
sgdisk -z /dev/sda
sgdisk -z /dev/sdb
sgdisk -n 1:0:+100M -t 1:ef00 -c 1:"EFI System" /dev/sda
sgdisk -n 2:0:+8G -t 2:fd00 -c 2:"Linux RAID" /dev/sda
@witooh
witooh / graphicsmagick.sh
Created February 1, 2015 17:42
Install Graphicsmagick
sudo apt-get install python-software-properties
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:rwky/graphicsmagick
sudo apt-get update
sudo apt-get install graphicsmagick
@xdamman
xdamman / install_ffmpeg_ubuntu.sh
Created July 2, 2014 21:03
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@danielgwood
danielgwood / gist:1510463
Created December 22, 2011 14:23
Human formatted time between dates (JavaScript)
/**
* Given two dates (or one date and assume "now" for the second), convert this to
* a human-readable string, like "2 months".
*
* I use this to put "3 months ago" strings into plugins. My use case has the date
* coming in as a seconds-only UNIX epoch, so the params are expected at this.
*
* @param time1 integer Number of seconds since UNIX epoch
* @param time2 integer Number of seconds since UNIX epoch
* @return string