Skip to content

Instantly share code, notes, and snippets.

View shri3k's full-sized avatar
🤖
automate all things

Yojan Shrestha shri3k

🤖
automate all things
  • Austin
View GitHub Profile
@shri3k
shri3k / http_streaming.md
Created June 6, 2022 03:34 — forked from CMCDragonkai/http_streaming.md
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@shri3k
shri3k / ANSI.md
Created April 12, 2022 11:20 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@shri3k
shri3k / webkit-pseudo-elements.md
Created April 26, 2019 21:03 — forked from leostratus/webkit-pseudo-elements.md
Webkit Pseudo-Element Selectors (Shadow DOM Elements)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

@shri3k
shri3k / python-es6-comparison.md
Created April 23, 2019 12:45 — forked from revolunet/python-es6-comparison.md
# Python VS ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
@shri3k
shri3k / OpenWrt detect new device and send text message.md
Created March 6, 2019 16:05 — forked from jwalanta/OpenWrt detect new device and send text message.md
Detect new network devices connecting to OpenWrt and send text message
@shri3k
shri3k / redis_cheatsheet.bash
Created June 8, 2018 02:03 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@shri3k
shri3k / destructuring.js
Created March 4, 2017 01:18 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
@shri3k
shri3k / README.md
Last active August 29, 2015 14:26 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@shri3k
shri3k / Notes
Last active August 29, 2015 14:22 — forked from slank/Notes
# Variables
FOO=here
FOO="here" # equivalent, always use quotes
BAR=$FOO
BAR="$FOO"
BAR="${FOO}"
BAR='$FOO' # single quotes, does not evaluate the variable
@shri3k
shri3k / .jshintrc.js
Last active August 29, 2015 14:21 — forked from connor/.jshintrc.js
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.