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
| @import url('https://fonts.googleapis.com/css?family=Comfortaa|Megrim|Montserrat'); | |
| $main-color:#0f6ffd; | |
| $c-gray: #8d959b; | |
| $c-light: #f9f9f9; | |
| $c-dark: #404060; | |
| $c-red: #e96575; | |
| $c-blue: #4b96f0; | |
| @mixin boxsizing-borderbox { |
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
| browser-sync start --server --files "*.html, css/*.css" |
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
| //Creating the database object | |
| var db = new PouchDB('http://localhost:5984/my_database'); | |
| //Database information | |
| //Preparing the document | |
| doc = { | |
| _id : '001', | |
| name: 'Raju', | |
| age : 23, | |
| designation : 'Designer' |
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
| <?php | |
| define('DB_USERNAME', 'root'); | |
| define('DB_PASSWORD', 'Hoang123'); | |
| define('DB_NAME', 'session_example'); | |
| define('DB_SERVER', 'localhost'); | |
| /* Attempt to connect to MySQL database */ | |
| /** @var mysqli $mysqli */ | |
| $mysqli = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME); |
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
| /* OneSignal.on('subscriptionChange', function(isSubscribed) { | |
| if (isSubscribed) { | |
| console.log(isSubscribed); | |
| // The user is subscribed | |
| // Either the user subscribed for the first time | |
| // Or the user was subscribed -> unsubscribed -> subscribed | |
| OneSignal.getUserId( function(userId) { | |
| $.post("/users/onesignal",{ | |
| onesignal_id:userId | |
| },function(response){ |
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 n=0; | |
| while n<item.quantity | |
| option(value=n++) Option #{n} |
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
| //Remove field from document. | |
| db.users.update({},{$unset:{cart:1}},{multi:true}) |
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
| /* HSL */ | |
| $color1: hsla(212%, 99%, 52%, 1); | |
| $color2: hsla(200%, 100%, 50%, 1); | |
| $color3: hsla(0%, 0%, 100%, 1); | |
| $color4: hsla(232%, 36%, 70%, 1); | |
| $color5: hsla(209%, 58%, 49%, 1); | |
| /* RGB */ | |
| $color1: rgba(12, 124, 254, 1); | |
| $color2: rgba(1, 172, 255, 1); |
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
| /*jshint esversion: 6 */ | |
| /* | |
| Write a algorithm that prints the numbers from 1 to n. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz” | |
| */ | |
| fizz(10); | |
| function fizz(number) { | |
| for (let z = 1; z < number; z++) { |
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
| /*jshint esversion: 6 */ | |
| /* | |
| Caesar Cipher is one of the earliest and simplest encryption technique. To encrypt a message, we shift the alphabets of the message by a fixed position or key. | |
| For example, if message is ABC , and we shift each character by 3 characters, we will get DEF. Here key is 3. | |
| */ | |
| caesarCipher('Javascript',1); |