Skip to content

Instantly share code, notes, and snippets.

View Ulekh's full-sized avatar

Oleg Bordun Ulekh

  • 10:53 (UTC +02:00)
View GitHub Profile
@ipanin
ipanin / mc_hotkeys.md
Created October 23, 2022 18:30
Midnight Commander Keyboard Shortcuts for macOS

Midnight Commander Keyboard Shortcuts for macOS

In macOS Meta key is Esc. In some other systems Meta key is Alt.

Ctrl

  • Ctrl-T - Select item (like Insert key in another OS).
  • Ctrl-Space - Calculate directory size.
  • Ctrl-O - Switch panels on/off.
  • Ctrl-U - Swap panels.
@jahe
jahe / enzyme-cheatsheet.js
Last active June 3, 2022 01:18
Enzyme Cheatsheet
// Show rendered HTML
const wrapper = shallow(<App />)
console.log(wrapper.debug())
// Disable lifecycle methods of react within tests
const wrapper = mount(<App />, { disableLifecycleMethods: true })
// Assert number of occurrences
expect(wrapper.find('p').length).toBe(1)
@bcnzer
bcnzer / postman-pre-request.js
Last active April 16, 2025 06:21
Postman pre-request script to automatically get a bearer token from Auth0 and save it for reuse
const echoPostRequest = {
url: 'https://<my url>.auth0.com/oauth/token',
method: 'POST',
header: 'Content-Type:application/json',
body: {
mode: 'application/json',
raw: JSON.stringify(
{
client_id:'<your client ID>',
client_secret:'<your client secret>',
1. Install ffmpeg:
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
2. Convert:
ffmpeg -i input-file.mp4 -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis output-file.webm
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active May 2, 2025 14:50
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@bartholomej
bartholomej / css-media-queries-cheat-sheet.css
Last active April 28, 2025 21:34
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }