Skip to content

Instantly share code, notes, and snippets.

View vladanyes's full-sized avatar
🏠
Working remotely

Vlad R vladanyes

🏠
Working remotely
  • Remote
View GitHub Profile
@LintangWisesa
LintangWisesa / StackBarChart.js
Created October 11, 2019 09:29
React Native Chart Kit - #4 Stacked Bar Chart
<StackedBarChart
data={{
labels: ["Test1", "Test2"],
legend: ["L1", "L2", "L3"],
data: [[60, 60, 60], [30, 30, 60]],
barColors: ["#dfe4ea", "#ced6e0", "#a4b0be"]
}}
width={Dimensions.get("window").width - 50} // from react-native
height={220}
yAxisLabel={"Rp"}
@javilobo8
javilobo8 / download-file.js
Last active May 27, 2024 21:00
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@glebcha
glebcha / gulpfile.js
Last active September 14, 2022 08:39
Gulp task sample (css and js minify+concat, compress images, watching for changes)
// Определяем зависимости в переменных
var gulp = require('gulp'),
cache = require('gulp-cache'),
clean = require('gulp-clean'),
stream = require('event-stream'),
size = require('gulp-size'),
jshint = require('gulp-jshint'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
minifyCSS = require('gulp-minify-css'),