Skip to content

Instantly share code, notes, and snippets.

View felixfbecker's full-sized avatar

Felix Becker felixfbecker

View GitHub Profile
@jaredpalmer
jaredpalmer / react-scripts+3.4.1.patch
Created May 26, 2020 14:46
Speed up Create React App with TypeScript in development
diff --git a/node_modules/react-scripts/config/webpack.config.js b/node_modules/react-scripts/config/webpack.config.js
index 25840d9..25c3c41 100644
--- a/node_modules/react-scripts/config/webpack.config.js
+++ b/node_modules/react-scripts/config/webpack.config.js
@@ -172,7 +172,7 @@ module.exports = function(webpackEnv) {
// The build folder.
path: isEnvProduction ? paths.appBuild : undefined,
// Add /* filename */ comments to generated require()s in the output.
- pathinfo: isEnvDevelopment,
+ pathinfo: false,
@IISResetMe
IISResetMe / PSTextEncodingConverter.class.ps1
Created May 28, 2019 18:32
System.Text.Encoding converter to easy argument conversion
using namespace System.Management.Automation
using namespace System.Text
class PSTextEncodingConverter : PSTypeConverter {
hidden
[hashtable]
$ConversionTable = @{
'ASCII' = [System.Text.Encoding]::ASCII
'ANSI' = [System.Text.Encoding]::ASCII
@jordwalke
jordwalke / watch.sh
Last active September 19, 2018 22:30
Watcher Script Using Unix Find.
#!/bin/bash
# Invoke like this:
# ./watch.sh my command here
# And it will run 'my command here' once, and then when it detects changes.
# TODO: Don't just search in the last second. Search for updates since the last
# completed build. Otherwise for big directories, midway through your search
# you've already taken 1s and you will miss updates.
@rsms
rsms / figma-project-stats.js
Created June 21, 2018 19:17
Script that generates statistics for a Figma project, like number of files, frames, versions etc
//
// Figma project stats
// Pulls statistics like number of files, frames, versions etc for a project.
//
// Usage:
// export FIGMA_API_ACCESS_TOKEN='your-token'
// node figma-project-stats.js <project-id>
//
// You can generate tokens in your account settings or at
// https://www.figma.com/developers/explorer#personal-access-token
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 9, 2024 20:00
Hyperlinks in Terminal Emulators
@georgebrock
georgebrock / Info.plist
Last active December 8, 2023 22:12
AppleScript to handle URLs
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<!-- Add this section: -->
<key>CFBundleURLTypes</key>
<array>
<dict>
@alanhamlett
alanhamlett / bower.json
Created December 14, 2015 21:15
WakaTime's bower.json JavaScript front-end dependencies
{
"name": "wakatime",
"version": "1.0.0",
"private": true,
"ignore": [
".jshintrc",
"**/.*",
"**/*.txt",
"test",
"tests",
@hvrauhal
hvrauhal / README.md
Last active May 23, 2022 05:51
Aggressively caching squid for http://registry.npmjs.org/

Caching http://registry.npmjs.org/ aggressively with squid

We run a lot of project in our automated test environment and they spend a lot of time doing npm install. One way to speed up npm install and hammer the registry a little less is to use the http-version of the registry and to pass the requests through a proxy.

However, the npm requests include an authorization-header and the responses come with an ETag and Cache-Control: max-age=60, so with default squid settings there is a lot of roundtrips to registry.npmjs.org that result in 304's.

This is what the requests look like once npm has cached the first set of responses:

GET http://registry.npmjs.org/sntp HTTP/1.1

@dctrwatson
dctrwatson / nginx.conf
Last active April 28, 2024 10:23
Caching NPM proxy using Nginx
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}