Skip to content

Instantly share code, notes, and snippets.

View xdivby0's full-sized avatar

Bengin Cetindere xdivby0

View GitHub Profile
@silkyfray
silkyfray / dob.jsx
Created January 5, 2020 21:57
How to use Bulma Calendar in React
import React, { useEffect } from 'react';
import bulmaCalendar from 'bulma-calendar/dist/js/bulma-calendar.min';
import "~bulma-calendar/dist/css/bulma-calendar.min.css"
function Dob({ className }) {
useEffect(() => {
// Initialize all input of date type.
const calendars = bulmaCalendar.attach('[type="date"]', {});
// Loop on each calendar initialized
@bhuizi
bhuizi / axios_get_pipe_zip.js
Last active October 27, 2021 14:09
axios get request w/ piping
const axios = require('axios');
const fs = require('fs');
const url = <path_to_file>
axios({
method: 'get',
url: url,
responseType:'stream'
})
.then(res => {
res.data.pipe(fs.createWriteStream('new.zip'));
@dastergon
dastergon / HttpURLCon.java
Created November 9, 2015 16:36
HTTP GET request in Java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class HttpURLCon {
private final String USER_AGENT = "Mozilla/5.0";
public static void main(String[] args) throws Exception {