Skip to content

Instantly share code, notes, and snippets.

Avatar
💫
流星

Florentin / 珞辰 ecklf

💫
流星
View GitHub Profile
@ecklf
ecklf / bcm4352-wifi-ac.md
Created Apr 18, 2022 — forked from jppommet/bcm4352-wifi-ac.md
Linux Ubuntu Drivers for Broadcom Chipset BCM4352 802.11ac Wireless Network Adapter [14e4:43b1]
View bcm4352-wifi-ac.md
@ecklf
ecklf / global.d.ts
Last active Sep 24, 2021
@mdx/js type defs
View global.d.ts
declare module "*.mdx" {
let MDXComponent: (props: any) => JSX.Element;
export default MDXComponent;
export const frontMatter: FrontMatter[];
}
@ecklf
ecklf / countries.sql
Created Sep 23, 2021 — forked from ereli/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes. PostgreSQL compatible
View countries.sql
CREATE SEQUENCE country_seq;
CREATE TABLE IF NOT EXISTS country (
id int NOT NULL DEFAULT NEXTVAL ('country_seq'),
iso char(2) NOT NULL,
name varchar(80) NOT NULL,
nicename varchar(80) NOT NULL,
iso3 char(3) DEFAULT NULL,
numcode smallint DEFAULT NULL,
phonecode int NOT NULL,
@ecklf
ecklf / amazon.md
Created Sep 22, 2021 — forked from terabyte/amazon.md
Amazon's Build System
View amazon.md

Prologue

I wrote this answer on stackexchange, here: https://stackoverflow.com/posts/12597919/

It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.

The Question

Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?

@ecklf
ecklf / useTimedEvent.ts
Last active Sep 7, 2021
Trigger an event after holding down an element for a duration
View useTimedEvent.ts
// Usage:
// const Button = () => {
// const { completion, ...bind } = useTimedEvent(() => { fire(); }, { duration: 1000 });
// return <button {...bind}>Button</button>;
// };
import { useEffect, useRef, useState } from "react";
const useTimedEvent = (
callback: (() => void) | (() => Promise<void>),
View flushdns.bat
netsh winsock reset
ipconfig /release
netsh int ip reset
ipconfig /flushdns
ipconfig /renew
@ecklf
ecklf / useStatusBarHeight.ts
Last active Mar 4, 2022
Determine the current status bar height. This is useful to determine keyboardVerticalOffset for KeyboardAvoidingView, since iPhone X and newer use different dimensions.
View useStatusBarHeight.ts
import { useEffect, useState } from "react";
import {
NativeEventEmitter,
NativeModules,
Platform,
StatusBar,
} from "react-native";
const { StatusBarManager } = NativeModules;
@ecklf
ecklf / Uninstall-pkg.md
Created Mar 17, 2021 — forked from githubutilities/Uninstall-pkg.md
Uninstall pkg manually in OS X
View Uninstall-pkg.md

Mac Uninstall pkg Manually

  • using pkgutil
# list all your installed packages
pkgutil --pkgs

# show your package info
pkgutil --pkg-info 
@ecklf
ecklf / next.config.js
Created Mar 15, 2021 — forked from pi0/next.config.js
Webpackbar with Next.js
View next.config.js
const Webpackbar = require('webpackbar')
module.exports = {
webpack: (config, { isServer }) => {
config.plugins.push(new Webpackbar({ name: isServer ? 'server' : 'client' }))
return config
}
}
@ecklf
ecklf / lodash-webpack-plugin+0.11.5.patch
Created Dec 11, 2020
lodash-webpack-plugin webpack 5 patch
View lodash-webpack-plugin+0.11.5.patch
diff --git a/node_modules/lodash-webpack-plugin/lib/index.js b/node_modules/lodash-webpack-plugin/lib/index.js
index d791223..2aca193 100644
--- a/node_modules/lodash-webpack-plugin/lib/index.js
+++ b/node_modules/lodash-webpack-plugin/lib/index.js
@@ -84,13 +84,17 @@ function () {
/* Webpack >= 4 */
if (compiler.hooks) {
+ const webpackVersion = parseInt(require('webpack/package.json').version, 10)
+