Skip to content

Instantly share code, notes, and snippets.

import React from 'react';
var template = function(){return(
<form onSubmit={ this.handleFormSubmit.bind(this) } >
<input type="text" value={ this.foo } ref="foo" />
<button type="submit">Go!</button>
</form>
)}
@pixelkritzel
pixelkritzel / extractKeys.js
Created February 24, 2016 14:41
Extract keys from string without delimiter
const str = '__key__dfdsafadf[__index__]kjjkl'
const regx = /__(\w+)__/g
let keys = [];
let res;
while((res = regx.exec(str)) !== null) { console.log( keys.push(res[1]) ) }
.visuallyhidden:not(:focus):not(:active) {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
border: 0;
padding: 0;
white-space: nowrap;
type IItem = {
key: number,
text: string
}
const items: IItem[] = [{key: 0, text: ''}]
// it says type never[] isn't assignable to type [{ text: string}]
for (let index = 1; index < 11; index++) {
items.push({
function createArray(length, value) {
return Array.apply(null, new Array(length)).map((i, index) => typeof value === 'function' ? value(i, index) : value)
}
createArray(10, (item, index) => ({ a: index }) )
createArray(10, 'lala')
@pixelkritzel
pixelkritzel / index.html
Created August 11, 2018 14:40
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->
We are using Node.js <script>document.write(process.versions.node)</script>,
@pixelkritzel
pixelkritzel / index.html
Created August 11, 2018 14:40
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->
We are using Node.js <script>document.write(process.versions.node)</script>,
@pixelkritzel
pixelkritzel / index.html
Created August 11, 2018 14:52
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->
We are using Node.js <script>document.write(process.versions.node)</script>,
function ready(payload) {
const fns = []
let lastReturnValue = payload;
function steady(fn) {
fns.push(fn)
return {
steady, go
}
Auf V6:
hugo: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by hugo)
hugo: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by hugo)
hugo: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by hugo)
hugo: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by hugo)
hugo: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by hugo)
Auf V7
hugo: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by hugo)
hugo: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by hugo)