Skip to content

Instantly share code, notes, and snippets.

View 4lun's full-sized avatar

Alun Davey 4lun

View GitHub Profile
@4lun
4lun / t480s-fix-trackpad.bashrc
Created June 14, 2023 09:28
Trackpad sometimes stops working on T480s under Ubuntu, this restarts the driver which "fixes" it (until it stops again) without a restart
alias fix_trackpad="sudo modprobe -r elan_i2c && sudo modprobe elan_i2c"
@LiEnby
LiEnby / flash.md
Last active June 16, 2023 07:56
Removing the timebomb from Adobe Flash Player

In Adobe Flash Player versions newer than 32.0.0.344 they added a "Timebomb" for the EOL. the player would refuse to run any custom flash content after 12/01/2021, instead it would just show this image

So knowing this, Lets crack it!

I acturally started looking into this before the 12/01/2021 hit, but only recently did i acturally discover a way to bypass the killswitch

(also- im aware i was not the first to do this, but i still did do it)

@nandorojo
nandorojo / knew.md
Last active April 7, 2024 23:27
What I wish I knew when I started with Expo Web, React Navigation & Next.js

I started using React Native in September 2018. I always forget some things when I build new apps, so I'll keep track of the gotchas on this post.

Some topics, such as navigation, will be fundamental to how I think about apps. Others, will be one-line helpers that make apps work more smoothly.

It's gotten to the point where I find my own answers from 6 months before on certain Github issues.

I'll keep adding over time as I think of more. If anyone thinks these topics would be useful, let me know and I'll elaborate.

I have made libraries to address a number of the topics here, from navigation to design.

@Zekfad
Zekfad / conventional-commits.md
Last active April 25, 2024 21:23
Conventional Commits Cheatsheet

Quick examples

  • feat: new feature
  • fix(scope): bug in scope
  • feat!: breaking change / feat(scope)!: rework API
  • chore(deps): update dependencies

Commit types

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Changes which doesn't change source code or tests e.g. changes to the build process, auxiliary tools, libraries
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@cereallarceny
cereallarceny / index.js
Last active May 2, 2023 06:41
Server-side rendering in Create React App
const md5File = require('md5-file');
const path = require('path');
// CSS styles will be imported on load and that complicates matters... ignore those bad boys!
const ignoreStyles = require('ignore-styles');
const register = ignoreStyles.default;
// We also want to ignore all image requests
// When running locally these will load from a standard import
// When running on the server, we want to load via their hashed version in the build folder
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active March 9, 2024 07:54
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@deckarep
deckarep / regular_map.go
Created September 10, 2017 01:04
Regular Thread-Safe Int Map
package RegularIntMap
type RegularIntMap struct {
sync.RWMutex
internal map[int]int
}
func NewRegularIntMap() *RegularIntMap {
return &RegularIntMap{
internal: make(map[int]int),
@samueljseay
samueljseay / es6-import-cheat-sheet.md
Created June 2, 2017 02:35
ES6 exports / imports cheat sheet
// default exports
export default 42;
export default {};
export default [];
export default (1 + 2);
export default foo;
export default function () {}
export default class {}
export default function foo () {}
@FoC-
FoC- / export.js
Created May 2, 2017 09:00
ES6 export import cheat sheet
// default exports
export default 42;
export default {};
export default [];
export default (1 + 2);
export default foo;
export default function () {}
export default class {}
export default function foo () {}
export default class foo {}