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
cd %APPDATA%\nvm\v8.10.0 # or whatever version you're using | |
mv npm npm-old | |
mv npm.cmd npm-old.cmd | |
cd node_modules\ | |
mv npm npm-old | |
cd npm-old\bin | |
node npm-cli.js i -g npm@latest | |
cd %APPDATA%\nvm\v8.10.0 # or whatever version you're using | |
rm npm-old |
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
<template> | |
<!-- WYSIWYG Editor --> | |
<div class="editor mb-4"> | |
<editor-menu-bar class="editor-bar" :editor="editor"> | |
<div slot-scope="{ commands, isActive, focused, getMarkAttrs }"> | |
<!-- Image --> | |
<label | |
class="btn btn-plain mb-0" | |
:class="{ 'is-loading': isUploading }" | |
v-tooltip="'Add Image'"> |
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
// Version 4.0 | |
const pSBC=(p,c0,c1,l)=>{ | |
let r,g,b,P,f,t,h,i=parseInt,m=Math.round,a=typeof(c1)=="string"; | |
if(typeof(p)!="number"||p<-1||p>1||typeof(c0)!="string"||(c0[0]!='r'&&c0[0]!='#')||(c1&&!a))return null; | |
if(!this.pSBCr)this.pSBCr=(d)=>{ | |
let n=d.length,x={}; | |
if(n>9){ | |
[r,g,b,a]=d=d.split(","),n=d.length; | |
if(n<3||n>4)return null; | |
x.r=i(r[3]=="a"?r.slice(5):r.slice(4)),x.g=i(g),x.b=i(b),x.a=a?parseFloat(a):-1 |
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
<template> | |
<!-- WYSIWYG Editor --> | |
<div class="editor mb-4"> | |
<editor-menu-bar class="editor-bar" :editor="editor"> | |
<div slot-scope="{ commands, isActive, focused }"> | |
<!-- Bold --> | |
<button | |
type="button" | |
class="btn btn-plain" | |
:class="{ 'is-active': isActive.bold() }" |
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
/** | |
* Get Color Contrast | |
* @param {string} hex Hexa Color Code | |
*/ | |
export const getColorContrast = (hex) => { | |
const color = hexToRgb(hex); | |
const treshold = 186; | |
const contrast = color | |
&& (color.r * 0.299 + color.g * 0.587 + color.b * 0.114) > treshold ? 'black' : 'white'; | |
// for (const key in color) { |
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
<?php | |
return [ | |
// ... | |
'debug_blacklist' => [ | |
'_ENV' => [ | |
'APP_KEY', | |
'DB_PASSWORD', |
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
<draggable | |
v-model="product.images" | |
v-bind="dragOptions" | |
@start="drag = true" | |
@end="drag = false"> | |
<transition-group | |
class="row small-gutter" | |
type="transition" | |
:name="!drag ? 'flip-list' : null"> | |
<div class="col" v-for="(image, index) in product.images" :key="index + 0"> |
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 netstat -nputwc |
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
file= | |
region=ap-southeast-1 | |
bucket= | |
resource="/${bucket}/${file}" | |
contentType="application/zip" | |
dateValue=`date -R` | |
stringToSign="PUT\n\n${contentType}\n${dateValue}\n${resource}" | |
s3Key= | |
s3Secret= | |
signature=`echo -en ${stringToSign} | openssl sha1 -hmac ${s3Secret} -binary | base64` |
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
date -d "yesterday 13:00" '+%Y-%m-%d' | |
echo $(date -d "yesterday 13:00" +%Y_%m_%d) |