This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
attributes: { | |
title: { | |
type: 'text' | |
}, | |
content: { | |
type: 'text' | |
}, | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"matchNumber": 1, | |
"kickOff": "2015-09-18T20:00:00.000Z", | |
"pool": "A", | |
"teamA": "England", | |
"teamB": "Fiji", | |
"location": "Twickenham, London" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var toto = { | |
foundation: 'Mozilla', | |
model: 'box', | |
week: 45, | |
transport: 'bus', | |
month: 7 | |
}; | |
JSON.stringify(toto); | |
// '{"foundation":"Mozilla","model":"box","week":45,"transport":"bus","month":7}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// Place user-specific overrides in this file, to ensure they're preserved | |
// when upgrading | |
{ | |
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We are on page | |
// http://www.example.com:8080/search?q=devmo#test | |
console.log(window.location.href) | |
// → "http://www.example.com:8080/search?q=devmo#test" | |
console.log(window.location.origin) | |
// → "http://www.example.com:8080" | |
console.log(window.location.protocol) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See http://fr.slideshare.net/pirhilton/how-to-name-things-the-hardest-problem-in-programming by @hilton | |
Summary of naming things badly : | |
- meaningless: foo | |
- too general: data | |
- too short: a | |
- too long: text_correction_by_editor | |
- abbreviated: acc (id is the only acceptable abbreviation) | |
- vague: InvoiceManager | |
- wrong: order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Array | |
var list = ['my', 'str', 'list']; | |
if (~list.indexOf('my')) { | |
console.log('the `list` array contains \'my\''); | |
} | |
if (!~list.indexOf('number')) { | |
console.log('the `list` array does not contain \'number\''); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /!\ May change whether root or not | |
netstat -pln [| grep PORT_NB] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup a service in /etc/init.d | |
https://www.debian-administration.org/article/28/Making_scripts_run_at_boot_time_with_Debian | |
# Don't forget the LSB tags | |
http://help.directadmin.com/item.php?id=379 | |
# Example on a script called blah: | |
$ update-rc.d blah defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.linux.com/community/blogs/133-general-linux/850945-setup-mutt-with-gmail-on-centos-and-ubuntu |
OlderNewer