Skip to content

Instantly share code, notes, and snippets.

View piotros's full-sized avatar
💻

Piotr Baran piotros

💻
View GitHub Profile
@wybiral
wybiral / noscript-tracking.go
Last active September 11, 2023 08:53
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)

npx script template

@emilio-martinez
emilio-martinez / README.md
Last active September 19, 2023 18:04
npx-git-diff-name-status

This script calls git diff --name-status and optionally adds --diff-filter when using --filter.

Examples: npx ./index.js v1.0.0 npx ./index.js v1.0.0 --filter mr

An argument of <revision>, <revision>..<revision>, or <revision>...<revision> is required to pass to git diff. See https://git-scm.com/docs/git-diff for more info.

Upload images to GitHub

  1. Create a new issue on GitHub.

  2. Drag an image into the comment field.

  3. Wait for the upload process to finish.

  4. Copy the URL and use it in your Markdown files on GitHub.

@zkat
zkat / index.js
Last active July 8, 2024 04:39
npx is cool
#!/usr/bin/env node
console.log('yay gist')
@myshov
myshov / function_invocation.js
Last active January 21, 2024 15:14
11 Ways to Invoke a Function
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);
@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active July 11, 2024 16:08
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@Turbo87
Turbo87 / app.js
Created February 15, 2015 04:05
webpack + font-awesome test
require('font-awesome/css/font-awesome.css');
document.body.innerHTML = '<i class="fa fa-fw fa-question"></i>';
moved to github --> https://github.com/bill-auger/git-branch-status/
@staltz
staltz / introrx.md
Last active July 29, 2024 05:55
The introduction to Reactive Programming you've been missing