Skip to content

Instantly share code, notes, and snippets.

View kjendrzyca's full-sized avatar
🖖

Krzysztof Jendrzyca kjendrzyca

🖖
View GitHub Profile
@kjendrzyca
kjendrzyca / flush-dns.sh
Created June 7, 2018 20:46 — forked from craigvantonder/flush-dns.sh
Flushing the DNS in Ubuntu 16.04
#!/bin/bash
# NB: First install nscd with sudo apt-get install nscd
# run this command to flush dns cache:
sudo /etc/init.d/dns-clean restart
# or use:
sudo /etc/init.d/networking force-reload
# Flush nscd dns cache:
sudo /etc/init.d/nscd restart
@kjendrzyca
kjendrzyca / docker-run
Last active January 28, 2018 12:32
docker-run
#!/usr/bin/env node
const program = require('commander') // eslint-disable-line
program
.version('0.1.0')
.option('-r, --rebuild', 'Start the containers and rebuild the images')
.option('-d, --down', 'Stop the containers')
.option('-l, --logs', 'Log the output of all containers')
.option('-f, --follow', 'Log the output of all containers in watch mode')
.parse(process.argv)
@kjendrzyca
kjendrzyca / JSXTransformer.min.js
Created October 30, 2017 20:23 — forked from johan/JSXTransformer.min.js
Week Calendar of Life
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSXTransformer=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){"use strict";var ReactTools=_dereq_("../main");var inlineSourceMap=_dereq_("./inline-source-map");var headEl;var dummyAnchor;var inlineScriptCount=0;var supportsAccessors=Obj
@kjendrzyca
kjendrzyca / setup.md
Created August 7, 2017 19:13
eslint-prettier
  1. do this:
yarn add prettier --dev
yarn add --dev prettier eslint-plugin-prettier
yarn add --dev eslint-config-prettier

// .eslintrc
{
 "extends": [
@kjendrzyca
kjendrzyca / component.jsx
Created December 22, 2016 13:23
Post - 13 things you need to know about React
React.createClass({
getInitialState () {
return {
hideTodos: true
}
},
render () {
return (
<div>
function async(genFunc) {
const genObj = genFunc();
const firstNext = genObj.next()
log(firstNext)
step(firstNext);
function step({value,done}) {
if (!done) {
// A Promise was yielded
value
@kjendrzyca
kjendrzyca / .eslintrc
Created March 13, 2016 17:54
problematic jsx auto-formatting
{
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true
},
parserOptions: {
ecmaVersion: 6,