Skip to content

Instantly share code, notes, and snippets.

View gubi's full-sized avatar

Alessandro Gubitosi gubi

View GitHub Profile
@TrevorJTClarke
TrevorJTClarke / ChromeEmulatorDeviceList.js
Created August 18, 2015 17:34
Chrome Emulator Device List and Properties
var emulatorDeviceList = [
{ name: 'Amazon Kindle Fire HDX', width: 2560, height: 1600, ratio: 2 },
{ name: 'Apple iPad', width: 1024, height: 768, ratio: 2 },
{ name: 'Apple iPad Mini', width: 1024, height: 768, ratio: 1 },
{ name: 'Apple iPhone 4', width: 320, height: 480, ratio: 2 },
{ name: 'Apple iPhone 5', width: 320, height: 568, ratio: 2 },
{ name: 'Apple iPhone 6', width: 375, height: 667, ratio: 2 },
{ name: 'Apple iPhone 6 Plus', width: 414, height: 736, ratio: 3 },
{ name: 'BlackBerry PlayBook', width: 1024, height: 600, ratio: 1 },
{ name: 'BlackBerry Z30', width: 360, height: 640, ratio: 2 },
@Vestride
Vestride / encoding-video.md
Last active May 17, 2024 06:55
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@gubi
gubi / README.md
Last active August 29, 2015 14:16
How to run Plex on Odroid U3 (Ubuntu OS)
@Nerten
Nerten / gist:a8bbbb071b231870bd72
Last active January 15, 2018 23:05
Install Plex Media Server to Ubuntu on Odroid-C1
sudo apt-get install -y libc6-armel gcc-multilib
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
mkdir /tmp/plex
wget -P /tmp/plex https://downloads.plex.tv/plex-media-server/0.9.11.7.803-87d0708/plexmediaserver-ros6-binaries_0.9.11.7.803-87d0708_armel.deb
dpkg -x /tmp/plex/plexmediaserver-ros6-binaries_0.9.11.7.803-87d0708_armel.deb /tmp/plex
sudo mv /tmp/plex/apps /
sudo mkdir /apps/plexmediaserver/temp
sudo mkdir /apps/plexmediaserver/MediaLibrary
sudo rm -rf /tmp/plex/
@malteo
malteo / gist:d7bb8eb835be9b734fc2
Created October 20, 2014 11:19
HTML select per le province italiane raggruppate per regione
<select>
<optgroup label="Piemonte">
<option value="TO">Torino</option>
<option value="VC">Vercelli</option>
<option value="NO">Novara</option>
<option value="CN">Cuneo</option>
<option value="AT">Asti</option>
<option value="AL">Alessandria</option>
<option value="BI">Biella</option>
<option value="VB">Verbano-Cusio-Ossola</option>
@gubi
gubi / Atom_packages.md
Last active May 13, 2022 13:20
Packages installed in Atom

Featured

  • Autocomplete
  • Autocomplete Plus
  • Zen
  • Color Picker
  • Linter
  • Linter Php
  • Linter csslint
  • Linter Jshint
  • Linter Jsonlint
@wgh000
wgh000 / province.php
Last active May 18, 2021 15:52
Province Italia - Array PHP
<?php
$province= array(
'AG' => 'Agrigento',
'AL' => 'Alessandria',
'AN' => 'Ancona',
'AO' => 'Aosta',
'AR' => 'Arezzo',
'AP' => 'Ascoli Piceno',
'AT' => 'Asti',
'AV' => 'Avellino',
@staydecent
staydecent / styles.less
Last active June 4, 2021 04:44
Smaller, more compact tab-bar for Atom.io
.tab-bar {
height: 34px;
padding: 0;
.tab {
-webkit-transform: none;
top: 2px;
line-height: 25px;
&.active {
@justinstern
justinstern / wc-pdf-product-vouchers-custom-fields.php
Last active May 2, 2017 20:40
Sample code demonstrating how to create custom voucher fields for with the WooCommerce PDF Product Vouchers plugin
<?php
// Put the following in your theme's functions.php for instance:
add_filter( 'wc_pdf_product_vouchers_voucher_fields', 'wc_pdf_product_vouchers_add_custom_fields', 10, 2 );
/**
* Adds some custom fields to the given product voucher
*
@marek-saji
marek-saji / dev-tld.md
Last active February 26, 2024 16:12
Configure local DNS server to serve #dev #TLD #ubuntu #linux

Configure local wildcard DNS server

  1. Install Dnsmasq: sudo apt-get install dnsmasq
  2. Since Ubuntu's NetworkManager uses dnsmasq, and since that messes things up a little for us, open up /etc/NetworkManager/NetworkManager.conf and comment out (#) the line that reads dns=dnsmasq. Restart NetworkManager afterwards: sudo restart network-manager.
  3. Make sure Dnsmasq listens to local DNS queries by editing /etc/dnsmasq.conf, and adding the line listen-address=127.0.0.1.
  4. Create a new file in /etc/dnsmasq.d (eg. /etc/dnsmasq.d/dev), and add the line address=/dev/127.0.0.1 to have dnsmasq resolve requests for *.dev domains. Restart Dnsmasq: sudo /etc/init.d/dnsmasq restart.

source: http://brunodbo.be/blog/2013/04/setting-up-wildcard-apache-virtual-host-wildcard-dns