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
//Triangle | |
&:after { | |
content: ''; | |
display: block; | |
position: absolute; | |
width: 10px; | |
height: 10px; | |
background: white; | |
border-right: 1px solid rgba(0, 0, 0, 0.24); | |
border-bottom: 1px solid rgba(0, 0, 0, 0.24); |
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
<div> | |
<input class="dollar-value" type="text" /> | |
<span class="animation-border"></span> | |
</div> |
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
function declension(number, titles) { | |
var cases = [2, 0, 1, 1, 1, 2]; | |
return titles[(number % 100 > 4 && number % 100 < 20) ? 2 : cases[(number % 10 < 5) ? number % 10 : 5]]; | |
} | |
var title = declension(N, ['арбуз','арбуза','арбузов']); |
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
// Checking internet connection | |
// Install "cordova plugin add cordova-plugin-network-information" | |
// states[Connection.UNKNOWN] = 'Unknown connection'; | |
// states[Connection.ETHERNET] = 'Ethernet connection'; | |
// states[Connection.WIFI] = 'WiFi connection'; | |
// states[Connection.CELL_2G] = 'Cell 2G connection'; | |
// states[Connection.CELL_3G] = 'Cell 3G connection'; | |
// states[Connection.CELL_4G] = 'Cell 4G connection'; |
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
//Determine back button | |
$ionicPlatform.registerBackButtonAction(function () { | |
// navigator.app.exitApp(); | |
// if (condition) { | |
// navigator.app.exitApp(); | |
// } else { | |
// debugger; | |
// } | |
}, 100); |
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 req = { | |
method: 'POST', | |
url: 'http://', | |
headers: {'Content-Type': 'application/x-www-form-urlencoded'}, | |
transformRequest: function(obj) { | |
var str = []; | |
for(var p in obj) | |
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); | |
return str.join("&"); | |
}, |
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
Disabling transitions between views |
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 the loader | |
$ionicLoading.show({ | |
content: 'Loading', | |
animation: 'fade-in', | |
showBackdrop: true, | |
maxWidth: 200, | |
showDelay: 0 | |
}); | |
//Remove spinner |
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
sudo chown -R $USER:$GROUP ~/.npm | |
sudo chown -R $USER:$GROUP ~/.config |
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
/// <reference path="vendingMachine.ts" /> | |
var machine = new VendingMachine(); |
OlderNewer