Skip to content

Instantly share code, notes, and snippets.

View machnicki's full-sized avatar

Miron Machnicki machnicki

View GitHub Profile
@machnicki
machnicki / jdk_download.sh
Created June 23, 2017 13:02 — forked from P7h/jdk_download.sh
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
@machnicki
machnicki / handler-react-3.js
Created April 14, 2016 06:59
Event handlers in React - 3
import React, { Component } from 'react'
import { MyInput } from 'myInputs'
class MyComponent extends Component {
constructor(props) {
super(props)
this.handleKeyPress = this.handleKeyPress.bind(this)
}
handleKeyPress(item) {
@machnicki
machnicki / handler-react-4.js
Created April 14, 2016 06:51
Event handlers in React - 4
import React, { Component } from 'react'
import { MyInput } from 'myInputs'
class MyComponent extends Component {
handleKeyPress(item, e) {
e.preventDefault()
if (e.nativeEvent.keyCode === 13) {
console.log(`This is enter on item, which is called ${item}!`)
}
@machnicki
machnicki / handler-react-5.js
Created April 14, 2016 06:47
Event handlers in React - 5
import React, { Component } from 'react'
import { MyInput } from 'myInputs'
class MyComponent extends Component {
handleKeyPress = (item, e) => {
e.preventDefault()
if (e.nativeEvent.keyCode === 13) {
console.log(`This is enter on item, which is called ${item}!`)
}
@machnicki
machnicki / handler-react-6.js
Last active June 15, 2017 16:35
Event handlers in React - 6
import React, { Component } from 'react'
import { MyInput } from 'myInputs'
class MyComponent extends Component {
handleKeyPress = (item) => (e) => {
e.preventDefault()
if (e.nativeEvent.keyCode === 13) {
console.log(`This is enter on item, which is called ${item}!`)
}
@machnicki
machnicki / handler-react-2.js
Last active October 20, 2016 16:01
Event handlers in React - 2
import React, { Component } from 'react'
import { MyInput, MyAnotherInput } from 'myInputs'
class MyComponent extends Component {
handleChange = (e) => e.preventDefault()
handleClick = (e) => e.preventDefault()
handleKeyPress = (e) => {
e.preventDefault()
@machnicki
machnicki / handler-react-1.js
Last active April 6, 2016 07:41
Event handlers in React - 1
import React, { Component } from 'react'
import { MyInput, MyAnotherInput } from 'myInputs'
class MyComponent extends Component {
constructor(props) {
super(props)
this.handleChange = this.handleChange.bind(this)
this.handleClick = this.handleClick.bind(this)
this.handleKeyPress = this.handleKeyPress.bind(this)
}
@machnicki
machnicki / Hover scalable background effect - part 3.markdown
Created February 13, 2016 11:43
Hover scalable background effect - part 3