Skip to content

Instantly share code, notes, and snippets.

View TomasHubelbauer's full-sized avatar
🏜️
The journey is the destination

Tomáš Hübelbauer TomasHubelbauer

🏜️
The journey is the destination
View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active May 3, 2024 10:19
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@MoOx
MoOx / README.md
Last active May 11, 2023 13:59
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
anonymous
anonymous / sha1-tls-deprecation-timeline.txt
Created October 18, 2016 19:01
SHA-1 TLS deprecation timeline
Chrome 39 (released 2014-11-18):
Leaf certs expiring >= 2017-01-01 with SHA-1 sig in chain -> UI "secure, but with minor errors" [chrome-1]
Chrome 40 (released 2015-01-20):
Leaf certs expiring (2016-06-01 - 2016-12-31) with SHA-1 sig in chain -> UI "secure, but with minor errors";
Leaf certs expiring >= 2017-01-01 with SHA-1 sign in chain -> UI "neutral, lacking security" [chrome-1]
Chrome 42 (released 2015-04-14):
Leaf certs expiring (2016-01-01 - 2016-12-16) with SHA-1 sig in chain -> UI "secure, but with minor errors";
Leaf certs expiring >= 2017-01-01 with SHA-1 sign in chain -> UI "affirmatively insecure" [chrome-1][filippo]
@vasanthk
vasanthk / System Design.md
Last active May 3, 2024 16:37
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@antelle
antelle / FiddlerScript.cs
Last active July 5, 2023 22:32
Change response in Fiddler
static function OnBeforeRequest(oSession: Session) {
if (oSession.RequestMethod == 'GET' && oSession.PathAndQuery.IndexOf('part_of_your_url') > 0) {
oSession.utilCreateResponseAndBypassServer();
oSession.oResponse.headers.HTTPResponseCode = 401;
oSession.oResponse.headers.HTTPResponseStatus = '401 Not Authorized';
oSession.oResponse.headers['Access-Control-Allow-Origin'] = '*';
oSession.utilSetResponseBody('response_body');
}
}
@iliakan
iliakan / server.conf
Created November 6, 2015 09:26 — forked from nkt/server.conf
Nginx configuration for separated frontend and backend endpoints
upstream example-webpack {
server 127.0.0.1:8080;
}
upstream example-backend {
server 127.0.0.1:3000;
}
server {
listen 80;
@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active April 25, 2024 04:16
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@NickCraver
NickCraver / Windows10-Setup.ps1
Last active April 1, 2024 10:52
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
From UI
=======
Attempting to gather dependencies information for package 'System.Net.Http.2.0.20710' with respect to project targeting '.NETFramework, Version=v4.5'
Attempting to resolve dependencies for package 'System.Net.Http.2.0.20710' with DependencyBehavior 'Lowest'
Resolving actions to install package 'System.Net.Http.2.0.20710'
Resolved actions to install package 'System.Net.Http.2.0.20710'
For adding package 'Microsoft.Net.Http 2.0.20710' to project 'ConsoleApplication37' that targets 'net45'.
For adding package 'Microsoft.Net.Http 2.0.20710' to project 'ConsoleApplication37' that targets 'net45'.
Adding package 'Microsoft.Net.Http 2.0.20710' to folder 'C:\dev\ConsoleApplication37\packages'

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).