Skip to content

Instantly share code, notes, and snippets.

View electricg's full-sized avatar

Giulia Alfonsi electricg

View GitHub Profile
@electricg
electricg / hangman.html
Last active December 31, 2015 00:18
Hangman game
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hangman</title>
<meta name="author" content="Giulia Alfonsi">
<meta name="description" content="Giulia Alfonsi's Hangman game">
<style>
textarea {
border: 1px solid #999;
@electricg
electricg / cover-letter.md
Last active January 28, 2018 14:52
To my next Employer: My Cover Letter

Dear Employer,

My name is Giulia (it's pronunciated the same as Julia) and I am a front end developer from Italy currently living in Brighton, UK.

I am writing to You for one simple reason: I love my job and I am looking for a company that loves it too. I moved from Italy to the United Kingdom with one dream: to improve myself, my knowledge and my skills, to find a place where innovation is appreciated, to work for a company that cares about what it does and how it does it. Honestly, so far I feel like I haven't found this magical place. Sure, all the companies I have worked for wanted to be succesful and wanted to create and provide a great product, but none of them really cared about my field: front end. Front end for me is not just "writing HTML and changing colors with CSS" as someone not familiar with the field may think. Front end for me is delivering a better experience to the users, writing good code, caring about performances, thinking forward, caring about possible problems, bugs and changes.

@electricg
electricg / CyanogenMod.md
Created June 22, 2013 14:09
CyanogenMod for Samsung Galaxy S II
@electricg
electricg / regex
Created February 27, 2013 11:50
Hex color regex for css
^#?(([a-fA-F0-9]{3}){1,2})$
@electricg
electricg / info.md
Last active December 14, 2015 00:38
Various configuration of my machines
@electricg
electricg / demo.html
Created February 4, 2013 13:36
Ellipsis
<!DOCTYPE HTML>
<html>
<head>
<style>
.ellipsis {
max-height: 200px;
overflow: hidden;
position: relative;
}
.js-ellipsis > *:first-child {
@electricg
electricg / trim.js
Created January 20, 2013 11:51
Trim any given character from a string
String.prototype.trimChar = function (find) {
var reg = new RegExp("^[" + find + "]+|[" + find + "]+$", "g");
return this.replace(reg, '');
}
String.prototype.ltrimChar = function (find) {
var reg = new RegExp("^[" + find + "]+", "g");
return this.replace(reg, '');
}
@electricg
electricg / about.md
Last active December 10, 2015 13:48
Apache virtual hosts

Change the folder permission of Site, Dropbox, Dropbox/www to "Read & Write" for all the users

@electricg
electricg / mouse.js
Last active April 27, 2021 16:32
Mouse position relative to document and element
// Which HTML element is the target of the event
function mouseTarget(e) {
var targ;
if (!e) var e = window.event;
if (e.target) targ = e.target;
else if (e.srcElement) targ = e.srcElement;
if (targ.nodeType == 3) // defeat Safari bug
targ = targ.parentNode;
return targ;
}