Skip to content

Instantly share code, notes, and snippets.

View gusmantap's full-sized avatar
🎯
Focusing

gusmantap

🎯
Focusing
  • Denpasar, Bali.
View GitHub Profile
@gusmantap
gusmantap / item.json
Last active December 10, 2017 05:41 — forked from anonymous/item.json
Data
[
{
"title":"Title 1",
"description":"lorem ipsum dolor sit amet"
},
{
"title":"Title 2"
},
{
"title":"Title 3"
/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */.flipster{display:block;overflow-x:hidden;overflow-y:visible;position:relative}.flipster:focus{outline:none}.flipster__container,.flipster__item{margin:0;padding:0;list-style-type:none;position:relative}.flipster__container{display:block;white-space:nowrap;word-spacing:-0.25em;transform-origin:50% 50%;backface-visibility:hidden}.flipster__item{display:inline-block;white-space:normal;word-spacing:normal;vertical-align:bottom}.flipster--click .flipster__item--past,.flipster--click .flipster__item--future{cursor:pointer}.flipster__item img{max-width:100%}.flipster__button{position:absolute;top:50%;display:block;appearance:none;background:none;border:none;padding:0;z-index:999;cursor:pointer;font-size:15px;opacity:.5;transition:opacity 500ms ease;margin:-1em 2em}.flipster__button svg{width:2em;stroke:currentColor;fill:transparent;stroke-width:3;stroke-linecap:round}.flipster__button:hover,.flipster__button:focus{opacity:1}.flipster__button--prev{left:0}.flipster__b
[{
"nama":{
"firstname":"Udin",
"lastname":"Syalala"},
"kelas":"XI"
},
{
"nama":{
"firstname":"Jack",
"lastname":"The Ripper"
@mixin importfont($name, $url) {
@font-face {
font-family: $name;
src: url($url) format('truetype');
/* Safari, Android, iOS */
}
}
@mixin objectInOut {
opacity: 1;
<div class="side-editor">
<div class="header-editor">
CONTENU
</div>
<div class="side-body-editor">
<div class="choose-content">
<h4>En-tête de lettre</h4>
<ul>
<li>
<div class="icon">
var MarketingCommunication = function(elem){
i = 0;
setInterval(function(){
var current = i;
var before = (current - 1) == -1 ? (elem.length - 1) : (current - 1);
var after = current + 1;
var canvas = document.querySelector("#logo-40 canvas");
var detail = {
icon: {
src: "./svg/icon-3.svg",
x: 186,
y: 84,
width: 192,
height: 164,
color_1: "#111111",
setTimeout(function(){
businessIllustration.removeClass("out");
setTimeout(function () {
// Logo In to Canvas Editor
logo.removeClass("out");
setTimeout(function () {
// Logo in to Canvas Editor
businessName.removeClass("out");
setTimeout(function () {
// Transition transorm set -40% left and right title
@gusmantap
gusmantap / axios-fetch-data.js
Created July 24, 2019 09:16
Axios loading data with percentage
let config = {
onUploadProgress: progressEvent => {
let percentCompleted = Math.floor((progressEvent.loaded * 100) / progressEvent.total);
// do whatever you like with the percentage complete
// maybe dispatch an action that will update a progress bar or something
}
}
axios.post('/path/to/post/', data, config)
.then(response => console.log(response));
// Functionnya
function getImage(url) {
return new Promise(function(resolve, reject) {
var img = new Image();
img.onload = function() {
resolve(url);
};
img.onerror = function() {
reject(url);
};