Skip to content

Instantly share code, notes, and snippets.

View electricg's full-sized avatar

Giulia Alfonsi electricg

View GitHub Profile
@electricg
electricg / readme.md
Last active August 29, 2015 14:13
Docker on mac os x

Docker doesn't have a proper uninstall method, so I followed this guide http://therealmarv.com/blog/how-to-fully-uninstall-the-offical-docker-os-x-installation/, although there is a script on the github repo https://github.com/boot2docker/osx-installer/blob/master/uninstall.sh

But it didn't work out, so I followed this guide http://viget.com/extend/how-to-use-docker-on-os-x-the-missing-guide and installed docker and boot2docker via homebrew.

When I run boot2docker init I hit the bug "Failed to initialize machine "boot2docker-vm": exit status 2" and the only way to solve it was doing as suggested here boot2docker/boot2docker-cli#148 (comment). An empty VM with no virtual hard drive is fine.

@electricg
electricg / readme.md
Created November 15, 2014 18:18
Homemade Hot Chocolate

Homemade Hot Chocolate

Original recipe from misya.info (in Italian).

  • 100gr dark chocolate 70% (I use Lindt)
  • 75gr cocoa powder
  • 140gr demerara sugar
  • 125gr potato starch

Mix all together and blend until you get a homogeneous powder.

@electricg
electricg / index.html
Created November 5, 2014 03:19
css clip-path // source http://jsbin.com/quqewi
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>css clip-path</title>
<style id="jsbin-css">
/* just to emulate the real environment */
body {
background: url(http://2014.ffconf.org/images/case.png) white;
margin: 10px;
@electricg
electricg / README.md
Last active August 29, 2015 14:05
Ubuntu vagrant example

In the host machine, update the hosts file with 127.0.0.1 giulia.nix.

After installing Vagrant, run vagrant box add hashicorp/precise32.

Clone the project and move inside the directory.

vagrant up to start the machine.

vagrant halt to shut down the machine.

@electricg
electricg / style.css
Created July 19, 2014 10:46
Markdown style for markdown editor
/* from https://github.com/sindresorhus/github-markdown-css */
@import 'http://rawgit.com/sindresorhus/github-markdown-css/gh-pages/github-markdown.css';
.markdown-body {
min-width: 200px;
max-width: 790px;
margin: 0 auto;
padding: 30px;
overflow: auto;

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
body {
color: red;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
</body>
</html>
@electricg
electricg / test.css
Created May 29, 2014 12:38
JS Bin test
body {
color: red;
}
@electricg
electricg / Vagrant
Created January 20, 2014 09:53
Vagrant config for IDE
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.