Skip to content

Instantly share code, notes, and snippets.

View ustun's full-sized avatar

Ustun Ozgur ustun

View GitHub Profile
@ustun
ustun / gist:7cba642ffc71628df863
Created October 25, 2014 10:27
Handling forms with react
# How to handle forms with React
1- Save all raw values in state, never read from dom using getdomnode.
2- Do not save whether the value is valid or not in state. This is the most
important point. Whether a form is valid or not can be inferred from state
form variables during render. So, we never have a state variable like
formValid. Otherwise, it can go out of sync.
3- Showing errors: We initially do not want to show the errors, even if the
@ustun
ustun / gist:0f1a86142b95a391773c
Created October 30, 2014 11:19
cider print defun to repl
(defun cider-eval-defun-at-point-in-repl ()
(interactive)
(let ((form (cider-defun-at-point)))
;; Strip excess whitespace
(while (string-match "\\`\s+\\|\n+\\'" form)
(setq form (replace-match "" t t form)))
(cider-switch-to-current-repl-buffer)
;;(set-buffer (cider-find-or-create-repl-buffer))
(goto-char (point-max))
@ustun
ustun / gist:523bab8ea50b1cf7aa52
Created November 23, 2014 18:47
Download all Clojure/conj 2014 videos
youtube-dl -citk --max-quality mp4 http://www.youtube.com/playlist?list=PLZdCLR02grLoc322bYirANEso3mmzvCiI
/*global Immutable*/
var raw_urls = _.range(1, 5).map(function (i) {
return {id: i, url: "url.com" + i, title: "Title of " + i, content: "Content of " + i};});
var some_map = _.object(_.map(raw_urls, function(item) {
return [item.id, item];
}));
@ustun
ustun / gist:5670b7480569fbb784a4
Created April 14, 2015 14:41
NavigatorIOS bug
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
Navigator,
@ustun
ustun / gist:5ee3250acf938e4115c6
Last active March 20, 2019 14:20
Ustun Ozgur Yazilim Is Ilani

Not: Mart 2016 itibariyle aşağıdaki ilan geçersizdir. Şu an için açık pozisyon bulunmamaktadır.

@ustun
ustun / gist:d8a8dc9161dff9049e25
Last active August 29, 2015 14:21
Ustun Ozgur Software Job Description

As Ustun Ozgur Software, we are looking for talented JavaScript and Python software developers to join our team in our new Istanbul office in the Karakoy area.

Our primary client is SellerCrowd, a venture-backed professional network site for the advertising industry. SellerCrowd serves over 20k members and has a large and growing base of paying subscribers to the service.

We are looking for talented and curious software developers. We are open to people of all experience levels. Our focus is building a software team where we can improve and learn together. We value a balanced and peaceful working environment.

The current software stack is built with Django on the backend and React on the frontend. We are looking for people with experience in these or similar libraries and a consistent focus on improving their skills.

The other tools we are using consist of Postgresql for database, RabbitMQ through Celery for task management and ElasticSearch and Redis for some other features. Because SellerCrowd is based

@ustun
ustun / gist:8b907ff63693105e5312
Last active September 9, 2016 20:12
Requirements and Recommendations for React Workshop

Requirements for React Workshop

For any questions, email me at ustun@ustunozgur.com

Software:

node.js or io.js should be installed.

Node modules to install:

@ustun
ustun / gist:efc93b9668dbeabbf809
Last active August 29, 2015 14:22
React Eğitim ve Çalıştayı

React Eğitimi ve Çalıştayı

Önemli Not: Yoğun ilgi üzerine kayıtlarımız dolmuş durumda. Ancak kayıt olup da gelmeyecekler olabilir. Bu nedenle gelmek isteyenler lütfen bekleme listesine (waitlist) kayıt olsun, yer açıldıkça haberdar edileceklerdir.

Yazane işbirliği ile düzenleyeceğimiz bu eğitimde Üstün Özgür Yazılım olarak Facebook'un React kütüphanesi üzerine ayrıntılı bir eğitim ve çalıştay vereceğiz. Etkinlik hem eğitim hem de katılımcıların bazı örnekleri geliştirdiği bir çalıştay şeklinde gerçekleşecek.

Etkinliğin iki temel amacı olacak: Birincisi React kullanımının Türkiye'de yaygınlaşmasını sağlamak. İkincisi de Üstün Özgür Yazılım olarak, React ve JavaScript konusunda hevesli çalışma arkadaşları bulmak. Lütfen iş ilanı ile ilgili olarak https://gist.github.com/ustun/5ee3250acf938e4115c6 adresindeki bilgileri inceleyin.

Etkinlik kaydı için lütfen şu adresi ziyaret edin: http://bit.ly/reactegitim

@ustun
ustun / react form example.js
Created November 12, 2015 15:18
react form example
var Utils = require('Utils');
var TestForm = React.createClass({
onSubmit(e) {
e.preventDefault();
this.setState({submitAttempted: true});
if (!this.state.inProgress) {