Skip to content

Instantly share code, notes, and snippets.

@brandonb927
brandonb927 / index.js
Last active May 2, 2024 03:17
Cypress + Typescript ts-loader option `transpileOnly` config helps with memory-contrained machines if you're not running in the Cypress Dashboard but rather using custom Jenkins CI, etc.
module.exports = (on, config) => {
// ...
const wpOptions = webpack.defaultOptions
wpOptions.webpackOptions.resolve = {
extensions: ['.ts', '.js'],
}
wpOptions.webpackOptions.module.rules.push({
test: /\.ts$/,
exclude: [/node_modules/],
@brandonb927
brandonb927 / convert-videos-for-web.sh
Created November 30, 2016 00:51 — forked from ob7/convert-videos-for-web.sh
Use FFmpeg to resize and generate .mp4 & .webm videos from any source video.
#!/bin/bash
#Scaling
#- Scale can be used as is which will set the height to 560 but keep aspect ratio for width.
#- Other options include setting both with & height
#- Watch out for sizing errors when not divisible by 2
if [[ ! "$1" || ! "$2" || ! "$3" ]] || [[ "$1" = '--help' ]]; then
if [[ "$1" = '--help' ]]; then
echo " "
@jmwhittaker
jmwhittaker / gist:8516514
Last active May 2, 2024 03:16
Use FFmpeg to resize and generate .mp4 & .webm videos from any source video.
/**
Scaling
- Scale can be used as is which will set the height to 560 but keep aspect ratio for width.
- Other options include setting both with & height
- Watch out for sizing errors when not divisible by 2
**/
/** MP4 1st pass **/
ffmpeg -i input.mov -vcodec libx264 -vprofile high -preset veryslow -b:v 225k -maxrate 300k -bufsize 1000k -vf scale=-1:560 -threads 2 -pass 1 -an -f mp4 /dev/null
@ob7
ob7 / convert-videos-for-web.sh
Last active May 2, 2024 03:16 — forked from jmwhittaker/gist:8516514
Use FFmpeg to resize and generate .mp4 & .webm videos from any source video.
#!/bin/bash
#Scaling
#- Scale can be used as is which will set the height to 560 but keep aspect ratio for width.
#- Other options include setting both with & height
#- Watch out for sizing errors when not divisible by 2
if [[ ! "$1" || ! "$2" || ! "$3" ]] || [[ "$1" = '--help' ]]; then
if [[ "$1" = '--help' ]]; then
echo " "
@pooladkhay
pooladkhay / wayland-blurry-fix.md
Last active May 2, 2024 03:16
VSCode blurry text under Wayland

Source: https://wiki.archlinux.org/title/Visual_Studio_Code#Blurry_text_under_Wayland

Due to Electron issues Visual Studio Code defaults to run under XWayland which may cause blurry text if you're using HiDPI screens.

In order to fix this issue you need to force Electron to run under Wayland by adding --enable-features=UseOzonePlatform --ozone-platform=wayland, for example you'll be launching VSCode like

$ code --enable-features=UseOzonePlatform --ozone-platform=wayland

This fix can be made permanent by creating a .desktop file or by directly editing /usr/share/applications/visual-studio-code.desktop

@noteeeeee
noteeeeee / JetBrainsActivation.md
Last active May 2, 2024 03:15
Webstorm/JetBrains products activation 2024 (Windows/MacOS)

Webstorm/JetBrains products activation 2024 (Windows/MacOS)

1.Proxy Settings

  1. Step 1: Navigate to Proxy settings.
  2. Step 2: Select "Manual proxy settings - HTTP".
    • Hostname: localhost
    • Port: 80

Set no proxy for:

@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 2, 2024 03:13
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@font-face {
font-family: 'EntypoRegular';
src: url('font/entypo.eot');
src: url('font/entypo.eot?#iefix') format('embedded-opentype'),
url('font/entypo.woff') format('woff'),
url('font/entypo.ttf') format('truetype'),
url('font/entypo.svg#EntypoRegular') format('svg');
font-weight: normal;
font-style: normal;
}
@fabiofl
fabiofl / gist:5873100
Created June 27, 2013 00:41
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@gabe565
gabe565 / change-arc-icon.md
Last active May 2, 2024 03:12
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy