Skip to content

Instantly share code, notes, and snippets.

View htkcodes's full-sized avatar
🎯
Focusing

BL/VCK htkcodes

🎯
Focusing
View GitHub Profile
@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);
//Remove field from document.
db.users.update({},{$unset:{cart:1}},{multi:true})
- var n=0;
while n<item.quantity
option(value=n++) Option #{n}
/* 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){
<?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);
@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'
@htkcodes
htkcodes / commands.js
Created August 13, 2018 20:25
USEFUL COMMANDS
browser-sync start --server --files "*.html, css/*.css"
@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 {
$(document).ready(function () {
console.log("ready!");
startTime();
});
function startTime() {
var today = new Date();
var h = today.getHours();
@htkcodes
htkcodes / gitflow-breakdown.md
Created November 22, 2018 20:41 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository