Skip to content

Instantly share code, notes, and snippets.

View htkcodes's full-sized avatar
🎯
Focusing

BL/VCK htkcodes

🎯
Focusing
View GitHub Profile
@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 {
@htkcodes
htkcodes / commands.js
Created August 13, 2018 20:25
USEFUL COMMANDS
browser-sync start --server --files "*.html, css/*.css"
@htkcodes
htkcodes / pouch.js
Last active March 21, 2018 20:28
PouchDB CRUD COMMANDS
//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'
<?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);
/* 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){
- var n=0;
while n<item.quantity
option(value=n++) Option #{n}
//Remove field from document.
db.users.update({},{$unset:{cart:1}},{multi:true})
@htkcodes
htkcodes / palette.scss
Created February 11, 2018 22:54
MY COLOR SCHEME
/* 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);
/*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++) {
/*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);