Skip to content

Instantly share code, notes, and snippets.

Viliam Elischer vire

Block or report user

Report or block vire

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gaearon
gaearon / prepack-gentle-intro-1.md
Last active Oct 5, 2019
A Gentle Introduction to Prepack, Part 1
View prepack-gentle-intro-1.md

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
@Kruemelkatze
Kruemelkatze / ! Theming Ant Design with Sass and Webpack.md
Last active Oct 5, 2019
Theming Ant Design with Sass and Webpack
View ! Theming Ant Design with Sass and Webpack.md

Theming Ant Design with Sass and Webpack

This is a solution on how to theme/customize Ant Design (which is written in Less) with Sass and webpack. Ant itself offers two solutions and a related article on theming, but these are only applicable if you use Less, the antd-init boilerplate or dva-cli.

What this solution offers:

  • use a single sass-file to customize (no duplicate variables for your project and Ant)
  • hot reload compatibility
  • no dependencies on outdated npm modules
  • easy integration with your existing webpack setup (webpack 3+ tested)
@j1r1k
j1r1k / functionalLenses.js
Created Mar 8, 2018
Code from a ngParty talk @ 7th Mar 2018
View functionalLenses.js
const R = require("ramda");
const data = {
title: "Intro to functional lenses",
author: {
name: "Jiri Marsicek",
email: "jiri.marsicek@gmail.com",
position: {
name: "Software Engineer",
@ximeg
ximeg / ThresholdingAlgo.py
Created Apr 20, 2017
Python implementation of smoothed z-score algorithm from http://stackoverflow.com/a/22640362/6029703
View ThresholdingAlgo.py
#!/usr/bin/env python
# Implementation of algorithm from http://stackoverflow.com/a/22640362/6029703
import numpy as np
import pylab
def thresholding_algo(y, lag, threshold, influence):
signals = np.zeros(len(y))
filteredY = np.array(y)
avgFilter = [0]*len(y)
stdFilter = [0]*len(y)
@MoOx
MoOx / .flowconfig
Last active Jul 12, 2018
flow config webpack adjustements to avoid the "Required module not found" for png, css, svg etcc
View .flowconfig
# ...
[options]
# webpack loaders
module.name_mapper='.*\.css$' -> '<PROJECT_ROOT>/flow/stub/css-modules.js'
module.name_mapper='.*\.\(svg\|png\|jpg\|gif\)$' -> '<PROJECT_ROOT>/flow/stub/url-loader.js'
@mpj
mpj / README.md
Last active Apr 28, 2016
REALLY quick and dirty static file dev server
View README.md

Usage

node dirtyserve.js

The point your browser to

http://localhost:3000/myfile.xxx

and the server will try to serve that file from the local server.

@subfuzion
subfuzion / curl.md
Last active Nov 15, 2019
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

View user.keymap.clj
[
[:app "cmd-t" :workspace.show]
[:app "cmd-shift-f" :searcher.show]
[:app "cmd-shift-k" :clear-console]
[:app "cmd-shift-s" :save-all]
[:app "cmd-ctrl-f" :window.fullscreen]
[:app "cmd-k" :toggle-console]
[:app "tab" :focus-last-editor]
[:workspace.focused "enter" :lt.plugins.workspace-nav/open-selection]
View folder-structure.md

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
You can’t perform that action at this time.