Skip to content

Instantly share code, notes, and snippets.

View gerisztein's full-sized avatar
:octocat:

Lucas Gerisztein gerisztein

:octocat:
  • cake magazine
  • London, UK
  • 10:01 (UTC +01:00)
View GitHub Profile
@gerisztein
gerisztein / voices.txt
Created September 14, 2017 16:39
Available voices on OSX
Alex en_US # Most people recognize me by my voice.
Alice it_IT # Salve, mi chiamo Alice e sono una voce italiana.
Alva sv_SE # Hej, jag heter Alva. Jag är en svensk röst.
Amelie fr_CA # Bonjour, je m’appelle Amelie. Je suis une voix canadienne.
Anna de_DE # Hallo, ich heiße Anna und ich bin eine deutsche Stimme.
Carmit he_IL # שלום. קוראים לי כרמית, ואני קול בשפה העברית.
Damayanti id_ID # Halo, nama saya Damayanti. Saya berbahasa Indonesia.
Daniel en_GB # Hello, my name is Daniel. I am a British-English voice.
Diego es_AR # Hola, me llamo Diego y soy una voz española.
Ellen nl_BE # Hallo, mijn naam is Ellen. Ik ben een Belgische stem.
@gerisztein
gerisztein / hoisting-example-01.js
Created September 15, 2016 03:24
hoisting examples
console.log(ghost);
// ReferenceError: ghost is not defined.
@gerisztein
gerisztein / hoisting001.js
Last active September 15, 2016 02:43
hoisting-examples.js
console.log(ghost);
// ReferenceError: ghost is not defined
@gerisztein
gerisztein / closure-examples.js
Last active March 28, 2016 13:41
We need to talk about closures (variables and lexical scope)
var text = 'Some text';
function showText () {
alert(text);
}
showText(); // Alert “Some text”
@gerisztein
gerisztein / capitalize.js
Created September 22, 2014 18:29
Capitalize filter for AngularJS
(function() {
'use strict';
angular.module('capitalize', [])
.filter('capitalize', function() {
return function(str) {
return (!!str) ? str.replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}) : '';
};
});
})();
@gerisztein
gerisztein / filter-whitespace.js
Last active August 29, 2015 14:06
White Space Replace Angular Filter
/*
* Angular Filter to Remove White Spaces in Expression
*
* usage: {{ text | whitespace:'str' }}
* the argument is optional, the default value is null.
* white spaces will be replaced by 'str'.
*
*/
app.filter('whitespace', function () {