Skip to content

Instantly share code, notes, and snippets.

View onurozkan's full-sized avatar

Onur Özkan onurozkan

View GitHub Profile
@onurozkan
onurozkan / nginx.conf
Created June 18, 2021 14:09 — forked from thoop/nginx.conf
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;

Extension List

  • Flow Language Support
  • vs-flow-ide
  • Prettier
  • Import Cost
@onurozkan
onurozkan / _readme.md
Created August 22, 2018 11:21 — forked from lambdahands/_readme.md
FlowType and CSS Modules

Huh?

So basically FlowType doesn't know about CSS Modules, a really handy way of dealing with the plagues of CSS in codebases (global variables and dependency wackiness mainly).

What WebPack allows us to do is "require" CSS files and use their class names:

import styles from "my_styles.css";
import React from "react";
@onurozkan
onurozkan / rating.vue
Created May 30, 2018 12:51
Micro rating component for vue.
<template>
<div class="component__rating">
<span :key="n" v-for="(n) in size">
<a href="#" @mouseover="highlight(n)" @mouseleave="highlight(0)" @click="select(n)" :class="{'rating-hover': (n <= hover), 'rating-selected': (n <= selected)}">
<i :class="setIcon(n)"></i>
</a>
</span>
</div>
</template>
@onurozkan
onurozkan / react-file-upload.js
Last active February 9, 2018 13:50 — forked from AshikNesin/react-file-upload.js
Simple React File Upload
import React from 'react'
import axios, { post } from 'axios';
class SimpleReactFileUpload extends React.Component {
constructor(props) {
super(props);
this.state ={
file:null
}

Keybase proof

I hereby claim:

  • I am onurozkan on github.
  • I am onurozkan (https://keybase.io/onurozkan) on keybase.
  • I have a public key ASA51DtzYpcJAYzUd_8yQvnAoS22Fa4Oqdq-g7uo3UKFzwo

To claim this, I am signing this object:

@onurozkan
onurozkan / daterangepicker.js
Last active March 26, 2021 13:34
daterangepicker-es6
/**
* @version: 2.1.24
* @author: Dan Grossman http://www.dangrossman.info/
* @copyright: Copyright (c) 2012-2016 Dan Grossman. All rights reserved.
* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
* @website: https://www.improvely.com/
*/
// Follow the UMD template https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js
import moment from 'moment';
var gulp = require('gulp'),
watch = require('gulp-watch'),
minify = require('gulp-minify-css'),
run = require('gulp-run'),
less = require('gulp-less');
chalk = require('chalk');
var paths = {
less: './assets/css/less/*.less'
/* Based on
* - EGM Mathematical Finance class by Enrique Garcia M. <egarcia@egm.co>
* - A Guide to the PMT, FV, IPMT and PPMT Functions by Kevin (aka MWVisa1)
*/
var ExcelFormulas = {
PVIF: function(rate, nper) {
return Math.pow(1 + rate, nper);
},
// The following could have been replaced by setting `Backbone.emulateHTTP = true;`
Backbone._sync = Backbone.sync;
Backbone.sync = function( method, model, options ) {
var beforeSend = options.beforeSend;
options = options || {};
options.success = function(){
options.Count = xhr.getResponseHeader("Count")
}
return Backbone._sync( method, model, options );