Skip to content

Instantly share code, notes, and snippets.

@lcomino
lcomino / mov-to-webm-alpha
Created October 6, 2019 23:11
ffmpeg | converter mov com alpha para webm com alpha
ffmpeg -i "video.mov" -f webm -c:v libvpx -b:v 2M -acodec libvorbis -auto-alt-ref 0 "video.webm" -hide_banner
@sonvp
sonvp / gist:7873060a99895f483ca48fdc030c71ad
Last active December 20, 2024 09:56
DrawableLeft to top or DrawableRight to top in TextView multiline.
1. Create Custom TextView.
public class TextViewDrawable extends android.support.v7.widget.AppCompatTextView {
public TextViewDrawable(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
/**
@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@dunderrrrrr
dunderrrrrr / GeoIP Block NGINX Ubuntu 20.04.md
Created April 19, 2021 08:28
Allow or block GeoIP in Nginx on Ubuntu 20.04

GeoIP Block NGINX Ubuntu 20.04

Block or filter IPs based on location in Nginx (tested on 1.18.0) on Ubuntu 20.04.

Install Nginx modules

To make use of the geographical filtering, we must first install the Nginx GeoIP module as well as the GeoIP database containing the mappings between visitors’ IP addresses and their respective countries. To do so, let’s execute:

$ sudo apt install libnginx-mod-http-geoip geoip-database
@lfender6445
lfender6445 / gist:9919357
Last active December 20, 2024 09:47
Pry Cheat Sheet

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@AnnoyingTechnology
AnnoyingTechnology / download_filemaker_server_19_20_lts_ubuntu.md
Last active December 20, 2024 09:43
Download Filemaker 19.5 Server Ubuntu 18LTS
@vitorbritto
vitorbritto / rm_mysql.md
Last active December 20, 2024 09:43
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    
@acarril
acarril / bootable-win-on-mac.md
Created November 18, 2022 17:49
Create a bootable Windows USB using macOS

For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.

1. Download a Windows disc image (i.e. ISO file)

You can download Windows 10 or Windows 11 directly from Microsoft.

2. Identify your USB drive

After plugging the drive to your machine, identify the name of the USB device using diskutil list, which should return an output like the one below. In my case, the correct disk name is disk2.