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
| git archive -o update.zip HEAD $(git diff --name-only HEAD^) |
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 confirm() { | |
| read -r -p "$@ [Y/n]: " confirm | |
| case "$confirm" in | |
| [Nn][Oo]|[Nn]) | |
| echo "Aborting." | |
| exit | |
| ;; | |
| esac | |
| } |
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 bump() { | |
| echo -n "Updating $1..." | |
| tmp_file=$(mktemp) | |
| rm -f "$tmp_file" | |
| echo $2 | |
| echo $3 | |
| echo $1 | |
| echo $tmp_file | |
| sed -i '' "s/$2/$3/1w $tmp_file" $1 | |
| if [ -s "$tmp_file" ]; then |
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
| var picker = new Lightpick({ | |
| field: document.getElementById('demo-11_1'), | |
| secondField: document.getElementById('demo-11_2'), | |
| repick: true, | |
| startDate: moment().startOf('month').add(7, 'day'), | |
| endDate: moment().add(1, 'month').endOf('month').subtract(7, 'day'), | |
| onSelect: function(start, end){ | |
| var str = ''; | |
| str += start ? start.format('Do MMMM YYYY') + ' to ' : ''; | |
| str += end ? end.format('Do MMMM YYYY') : '...'; |
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
| new Lightpick({ | |
| field: document.getElementById('demo-10'), | |
| singleDate: false, | |
| lang: 'ru', | |
| locale: { | |
| tooltip: { | |
| one: 'день', | |
| few: 'дня', | |
| many: 'дней', | |
| }, |
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
| <p><input type="text" id="datepicker"/></p> | |
| <script> | |
| var picker = new Lightpick({ field: document.getElementById('datepicker') }); | |
| </script> |
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
| var picker = new Lightpick({ | |
| field: document.getElementById('demo-9'), | |
| singleDate: false, | |
| minDays: 3, | |
| maxDays: 7, | |
| onSelect: function(start, end){ | |
| var str = ''; | |
| str += start ? start.format('Do MMMM YYYY') + ' to ' : ''; | |
| str += end ? end.format('Do MMMM YYYY') : '...'; | |
| document.getElementById('result-9').innerHTML = str; |
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
| var picker = new Lightpick({ | |
| field: document.getElementById('demo-8'), | |
| singleDate: false, | |
| selectBackward: true, | |
| onSelect: function(start, end){ | |
| var str = ''; | |
| str += start ? start.format('Do MMMM YYYY') + ' to ' : ''; | |
| str += end ? end.format('Do MMMM YYYY') : '...'; | |
| document.getElementById('result-8').innerHTML = str; | |
| } |
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
| var picker = new Lightpick({ | |
| field: document.getElementById('demo-7'), | |
| singleDate: false, | |
| selectForward: true, | |
| onSelect: function(start, end){ | |
| var str = ''; | |
| str += start ? start.format('Do MMMM YYYY') + ' to ' : ''; | |
| str += end ? end.format('Do MMMM YYYY') : '...'; | |
| document.getElementById('result-7').innerHTML = str; | |
| } |
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
| var picker = new Lightpick({ | |
| field: document.getElementById('demo-6'), | |
| singleDate: false, | |
| minDate: moment().startOf('month').add(7, 'day'), | |
| maxDate: moment().endOf('month').subtract(7, 'day'), | |
| onSelect: function(start, end){ | |
| var str = ''; | |
| str += start ? start.format('Do MMMM YYYY') + ' to ' : ''; | |
| str += end ? end.format('Do MMMM YYYY') : '...'; | |
| document.getElementById('result-6').innerHTML = str; |
NewerOlder