Skip to content

Instantly share code, notes, and snippets.

View ewnd9's full-sized avatar
💭
Working

ewnd9

💭
Working
View GitHub Profile
@sean-hill
sean-hill / node.js, selenium grid, xvfb, and webdriver.io
Last active March 4, 2020 22:47
node.js, selenium grid, xvfb, and webdriver.io
node.js, selenium grid, xvfb, and webdriver.io
@armand1m
armand1m / Dockerfile
Last active March 10, 2024 14:54
Yarn cache compatible Dockerfile
FROM alpine
RUN apk add --update --no-cache nodejs
RUN npm i -g yarn
ADD package.json yarn.lock /tmp/
ADD .yarn-cache.tgz /
RUN cd /tmp && yarn
RUN mkdir -p /service && cd /service && ln -s /tmp/node_modules
anonymous
anonymous / IRC client in pure bash 4
Created March 28, 2016 16:57
IRC client written in pure bash using only bash builtin commands and no other binaries.
#!/bin/bash
#no PATH, no way to accidently run any programs
PATH=''
#useful variables
term_height=0
term_width=0
term_scroll_height=0
status_line_row=0
@queckezz
queckezz / 01_overview.md
Last active June 26, 2017 19:48
yo-yo redux counter example

overview

@scmx
scmx / react-proptype-warnings-as-errors-with-sinon.markdown
Last active March 1, 2019 08:42
Make React PropType warnings throw errors with mocha.js, enzyme.js and sinon.js

Make React PropType warnings throw errors with enzyme.js + sinon.js + mocha.js

A simple stateless functional component that we want to test that it renders without propType warnings.

import React, { PropTypes } from 'react'

let VersionListItem = function ({ active, version }) {
  return (
@odedw
odedw / .eslintrc.yaml
Last active March 8, 2022 05:27 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
# http:#eslint.org/docs/rules/
ecmaFeatures:
binaryLiterals: false # enable binary literals
blockBindings: false # enable let and const (aka block bindings)
defaultParams: false # enable default function parameters
forOf: false # enable for-of loops
generators: false # enable generators
objectLiteralComputedProperties: false # enable computed object literal property names
objectLiteralDuplicateProperties: false # enable duplicate object literal properties in strict mode
objectLiteralShorthandMethods: false # enable object literal shorthand methods
@saeidzebardast
saeidzebardast / local-npm.md
Last active February 13, 2019 17:24 — forked from nolanlawson/local-npm.md
Setting up local-npm as a launch daemon on OS X and Ubuntu.

Setting up local-npm on OS X and Ubuntu

These instructions will set up local-npm so that it runs as a launch daemon, meaning that it will start up whenever you log in.

Install local-npm

First, install local-npm and pm2:

npm install -g local-npm
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@madx
madx / webpack.server.config.js
Created September 15, 2015 13:55
Webpack config for an Express app in Node.js
const path = require("path")
const fs = require("fs")
// -- Webpack configuration --
const config = {}
// Application entry point
config.entry = "./src/server/index.js"
@lahmatiy
lahmatiy / custom-progressbar.js
Last active August 29, 2015 14:26
Done on the knee progressbar
var chalk = require('chalk');
var readline = require('readline');
var BAR_LENGTH = 40;
var lines = 0;
function repeatStr(str, len){
return new Array(parseInt(len) + 1).join(str);
}
function drawBarLine(fill, str){