Skip to content

Instantly share code, notes, and snippets.

View emadehsan's full-sized avatar
🤸‍♂️
Overthinking about overthinking

Emad Ehsan emadehsan

🤸‍♂️
Overthinking about overthinking
View GitHub Profile
@pletchm
pletchm / Xarray Example Cheatsheet.ipynb
Last active April 27, 2023 13:18
Xarray Example Cheatsheet
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@emadehsan
emadehsan / Test.md
Last active August 14, 2019 13:02
Automatically set cookie in Postman

In the Tests tab of your request, type this code

let cookie = postman.getResponseHeader("Set-Cookie");
postman.setEnvironmentVariable("cookie", cookie);

This will set an environment vairable. In all the requests that need cookie, add to the Request Header

Key: Cookie

@tegansnyder
tegansnyder / Preventing-Puppeteer-Detection.md
Created February 23, 2018 02:41
Preventing Puppeteer Detection

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',
@veb
veb / scraper.js
Created August 26, 2017 09:02
Scrapes the main page of HackerNews and returns an array of objects using Puppeteer and Cheerio
const puppeteer = require('puppeteer');
const cheerio = require('cheerio');
async function run() {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://news.ycombinator.com');
let content = await page.content();
var $ = cheerio.load(content);
@sivaprabug
sivaprabug / postman.js
Created July 5, 2017 10:23
Set cookie value and csrf value as global postaman value
tests["Status code is 200"] = responseCode.code === 200;
// getting CSRF token value from responseBody and stored in global variable
var data = JSON.parse(responseBody);
console.info("CSRF Token Value = " + data.CSRFToken);
postman.setGlobalVariable("csrftoken", data.CSRFToken);
// getting QSESSIONID value from Cookie and stored in global variable
var qsessionidValue = postman.getResponseCookie("QSESSIONID").value
console.log(qsessionidValue);
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active April 29, 2024 17:57
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 1, 2024 08:48
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@askilondz
askilondz / gistlog.yml
Last active April 2, 2024 10:44
Adaptive Streaming with MPEG-DASH and HLS using AWS

Adaptive Streaming has become the neccessity for streaming video and audio. Unfortantely, as of this post, there isn't a whole lot of tutorials that accumulate all of the steps to get this working. Hopefully this post achieves that. This post focuses on using Amazon Web Services (AWS) to transcode for HLS and DASH and be the Content Delivery Network (CDN) that delivers the stream to your web page. We'll be using Video.js for the HTML5 player as well as javascript support libaries to make Video.js work with HLS and DASH.

So Here's what you need:

Set up three S3 buckets

@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would