This file contains hidden or 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
| // Side-effect inside constructor() | |
| class Page extends React.Component { | |
| static propTypes = { | |
| fetch: PropTypes.func, | |
| isPending: Proptypes.bool, // from store: It could be dirty from previous rendering | |
| data: PropTypes.object, // from store: It could be dirty from previous rendering | |
| resetState: PropTypes.func, // It will clean both isPending and data | |
| } | |
This file contains hidden or 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
| #!/bin/sh | |
| for remote in $(git remote); | |
| do | |
| echo "\n\nYour current HEAD diff from $remote/master: \n$(git log --left-right --graph --cherry-pick --oneline HEAD...$remote/master) \n"; | |
| done |
This file contains hidden or 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
| (function() { | |
| var script = document.createElement("script"); | |
| script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"; | |
| script.onload = script.onreadystatechange = function(){ | |
| // define a handler | |
| function changeLang(e) { | |
| langMap = { | |
| 69: 'inglese', | |
| 73: 'italiano' | |
| } |
This file contains hidden or 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
| [{"code":"af-ZA","name":"Afrikaans - South Africa"},{"code":"sq-AL","name":"Albanian - Albania"},{"code":"ar-DZ","name":"Arabic - Algeria"},{"code":"ar-BH","name":"Arabic - Bahrain"},{"code":"ar-EG","name":"Arabic - Egypt"},{"code":"ar-IQ","name":"Arabic - Iraq"},{"code":"ar-JO","name":"Arabic - Jordan"},{"code":"ar-KW","name":"Arabic - Kuwait"},{"code":"ar-LB","name":"Arabic - Lebanon"},{"code":"ar-LY","name":"Arabic - Libya"},{"code":"ar-MA","name":"Arabic - Morocco"},{"code":"ar-OM","name":"Arabic - Oman"},{"code":"ar-QA","name":"Arabic - Qatar"},{"code":"ar-SA","name":"Arabic - Saudi Arabia"},{"code":"ar-SY","name":"Arabic - Syria"},{"code":"ar-TN","name":"Arabic - Tunisia"},{"code":"ar-AE","name":"Arabic - United Arab Emirates"},{"code":"ar-YE","name":"Arabic - Yemen"},{"code":"hy-AM","name":"Armenian - Armenia"},{"code":"Cy-az-AZ","name":"Azeri (Cyrillic) - Azerbaijan"},{"code":"Lt-az-AZ","name":"Azeri (Latin) - Azerbaijan"},{"code":"eu-ES","name":"Basque - Basque"},{"code":"be-BY","name":"Belarusian - |
This file contains hidden or 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
| [ | |
| { | |
| "ISO": "AD", | |
| "ISO3": "AND", | |
| "ISO-Numeric": 20, | |
| "fips": "AN", | |
| "Country": "Andorra", | |
| "Capital": "Andorra la Vella", | |
| "Area(in sq km)": 468, | |
| "Population": 84000, |
This file contains hidden or 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
| [ | |
| {"code":"ab","name":"Abkhaz","nativeName":"аҧсуа"}, | |
| {"code":"aa","name":"Afar","nativeName":"Afaraf"}, | |
| {"code":"af","name":"Afrikaans","nativeName":"Afrikaans"}, | |
| {"code":"ak","name":"Akan","nativeName":"Akan"}, | |
| {"code":"sq","name":"Albanian","nativeName":"Shqip"}, | |
| {"code":"am","name":"Amharic","nativeName":"አማርኛ"}, | |
| {"code":"ar","name":"Arabic","nativeName":"العربية"}, | |
| {"code":"an","name":"Aragonese","nativeName":"Aragonés"}, | |
| {"code":"hy","name":"Armenian","nativeName":"Հայերեն"}, |
This file contains hidden or 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
| #Author: Marco Andreotti | |
| # Email: marco.andreotti@tanaza.com | |
| # License: MIT | |
| # Nagios Usage: check_nrpe!check_docker_container!_container_id_ | |
| # Usage: ./check_docker_container.sh _container_id_ | |
| # | |
| # The script checks if a container is running. | |
| # OK - running | |
| # UNKNOWN - does not exist |
This file contains hidden or 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
| // polyfill window.getMatchedCSSRules() in FireFox 6+ | |
| if ( typeof window.getMatchedCSSRules !== 'function' ) { | |
| var ELEMENT_RE = /[\w-]+/g, | |
| ID_RE = /#[\w-]+/g, | |
| CLASS_RE = /\.[\w-]+/g, | |
| ATTR_RE = /\[[^\]]+\]/g, | |
| // :not() pseudo-class does not add to specificity, but its content does as if it was outside it | |
| PSEUDO_CLASSES_RE = /\:(?!not)[\w-]+(\(.*\))?/g, | |
| PSEUDO_ELEMENTS_RE = /\:\:?(after|before|first-letter|first-line|selection)/g; | |
| // convert an array-like object to array |
This file contains hidden or 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
| ####################################################################################################################### | |
| # | |
| # Purpose: Bash script to fix a few elements of the default Dokku script with running correctly on Debian Wheezy | |
| # Author: Shirkey <dev@shirkey.me> | |
| # License: MIT | |
| # Tested with: | |
| # * Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux | |
| # * v0.2.1 of Dokku installer script | |
| # | |
| ####################################################################################################################### |