Skip to content

Instantly share code, notes, and snippets.

View nfrigus's full-sized avatar

Semen Shestakov nfrigus

View GitHub Profile

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@nfrigus
nfrigus / servefile.sh
Created June 2, 2022 23:48 — forked from talwai/servefile.sh
One-shot HTTP webserver to serve file contents using netcat
{ echo -ne "HTTP/1.0 200 OK\r\nContent-Length: $(wc -c <some.file)\r\n\r\n"; cat some.file; } | nc -l 8080
@nfrigus
nfrigus / index.test.js
Created October 26, 2017 20:27
Example Puppeteer e2e tests from Ropig
import faker from 'faker'
import puppeteer from 'puppeteer'
const appUrlBase = 'http://localhost:4000'
const routes = {
public: {
register: `${appUrlBase}/register`,
login: `${appUrlBase}/login`,
noMatch: `${appUrlBase}/asdf`,
},
@nfrigus
nfrigus / README.rst
Created May 18, 2017 11:13 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@nfrigus
nfrigus / README.rst
Created May 18, 2017 11:13 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@nfrigus
nfrigus / readme.md
Created February 21, 2017 07:42 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@nfrigus
nfrigus / git-aliases.md
Created February 7, 2017 14:50 — forked from colmarius/git-aliases.md
A list of useful git aliases

Intro

Bellow follows a list of aliases, split between beginner and advanced.

To start using them right away you should place the aliases you like most in a file like ~/.zsh/git. Now all that remains is to add the following line to your ~/.zshrc or ~/.bashrc:

. ~/.zsh/git # git aliases
@nfrigus
nfrigus / mysql_pwd_reset.sh
Created October 27, 2016 11:30 — forked from thomasmb/mysql_pwd_reset.sh
A shell script for resetting the root MySQL password
# Please confirm that you want to reset the MySQL passwords
CONFIRM="n"
echo -n "Please confirm MySQL password reset. Continue? (y/N): "
read -n 1 CONFIRM_INPUT
if [ -n "$CONFIRM_INPUT" ]; then
CONFIRM=$CONFIRM_INPUT
fi
echo
@nfrigus
nfrigus / README.md
Last active February 22, 2016 09:18
RD request template

request

{
	"offset": 0,
	"limit": 10,
	"order": {
		"column1" : "ASC",
		"column2" : "DESC"
	},
	"filter": [CRITERIA_LIST],
@nfrigus
nfrigus / README.md
Created January 21, 2016 13:22 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version