Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Busy in getting busier

Ravi Kumar Prasad ravikp7

🎯
Busy in getting busier
View GitHub Profile
@jsoverson
jsoverson / intercept.js
Created February 19, 2019 21:28
Intercept responses with chrome and puppeteer
View intercept.js
const puppeteer = require('puppeteer');
const prettier = require('prettier');
const atob = require('atob');
const btoa = require('btoa');
const scriptUrlPatterns = [
'*'
]
const requestCache = new Map();
@stigok
stigok / githook.js
Last active December 30, 2022 22:25
Verify GitHub webhook signature header in Node.js
View githook.js
/*
* Verify GitHub webhook signature header in Node.js
* Written by stigok and others (see gist link for contributor comments)
* https://gist.github.com/stigok/57d075c1cf2a609cb758898c0b202428
* Licensed CC0 1.0 Universal
*/
const crypto = require('crypto')
const express = require('express')
const bodyParser = require('body-parser')
@jadonk
jadonk / README.md
Last active January 26, 2022 13:38
Hacks and node-beaglebone-boot
View README.md

Current status:

playdoh:BBBlfs jason$ node --version
v7.5.0
playdoh:BBBlfs jason$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
@jhermsmeier
jhermsmeier / README.md
Last active May 10, 2017 20:33
Copy a source to target in a very fast & memory efficient way
View README.md

FastPipe

After many hours of trial and error, self-optimizing streams and such, I have finally found the fastest (?) and most efficient (?) way to copy an image from a given source to a given target.

There where several constraints that had to be as optimal as possible:

  • Speed
  • Memory consumption
@jadonk
jadonk / README.md
Last active April 9, 2021 18:42
Add X11 to a BeagleBone IoT image
View README.md

As 'root' perform the following:

git clone https://gist.github.com/jadonk/39d0fcfc323347d88e995cdfee02bdad
apt-get install -y --no-install-recommends xinput xinput-calibrator xorg xserver-xorg-video-fbdev \
    xserver-xorg-video-modesetting lightdm xserver-xorg-core xserver-xorg-input-joystick \
    dbus-x11 openbox cmst compton-conf libfm-tools libgl1-mesa-dri lximage-qt	\
    lxqt-about lxqt-admin lxqt-common lxqt-config lxqt-globalkeys lxqt-notificationd	\
    lxqt-panel lxqt-policykit lxqt-runner lxqt-session lxqt-sudo	\
 obconf pcmanfm-qt qterminal \
@fstab
fstab / MATRIX.md
Last active January 5, 2022 12:31
How to use matrix.org and vector.im as an IRC client
View MATRIX.md

How to use matrix.org and vector.im as an IRC client

How to Join an IRC Channel on matrix.org

Join the room #freenode_<#channel>:matrix.org, replacing <#channel> with the name of the IRC channel. For example, in order to join the #prometheus IRC channel, join the room #freenode_#prometheus:matrix.org on matrix.org.

In vector.im, rooms can be joined with the directory symbol on the bottom left.

@subfuzion
subfuzion / curl.md
Last active February 7, 2023 00:00
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.