Skip to content

Instantly share code, notes, and snippets.

View mayconvm's full-sized avatar

Maycon Moreira mayconvm

View GitHub Profile
@mayconvm
mayconvm / gist:991c925ac26a4ce713992d05fd208c4f
Created March 18, 2020 10:29 — forked from szydan/gist:b225749445b3602083ed
<U+FEFF> character showing up in files. How to remove them?
1) In your terminal, open the file using vim:
vim file_name
2) Remove all BOM characters:
:set nobomb
3) Save the file:
:wq
@mayconvm
mayconvm / rsub.md
Created July 20, 2018 12:37 — forked from connorjan/rsub.md
Editing Files Remotely via SSH on SublimeText 3

Editing Files Remotely via SSH on SublimeText 3

Sometimes you need to edit a file on a remote server, but using vim/emacs is not very practical, due to lag and speed of screen refresh.

TextMate users have the classic rmate, but it was implemented in Ruby, which may not be available on the remote server.

A better option is to use this version of rmate, implemented in pure Bash. It's a single file, self-contained, and with no external dependencies.

Step by step:

@mayconvm
mayconvm / POST with AB
Last active January 24, 2018 16:04 — forked from kelvinn/cmd.sh
Example of using Apache Bench (ab) to POST JSON to an API
# post_loc.txt contains the json you want to post
# -p means to POST it
# -H adds an Auth header (could be Basic or Token)
# -T sets the Content-Type
# -c is concurrent clients
# -n is the number of requests to run in the test
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/
@mayconvm
mayconvm / readme.md
Created September 20, 2016 16:50 — forked from HerculanoGripp/Video Crop for Video Wall
Script to crop videos for video wall

Python script to crop video for video wall aplications using ffmpeg.

Required:

  • ffmpeg installed;
  • ffprobe installed;

Using: python video-wall.py video-file nxn

  • video-file - path to video file
  • nxn - matriz of video wall
#!/usr/bash
phpbrew lookup-prefix homebrew
sudo apt-get install apache2-dev
sudo apt-get install apache2
sudo chmod -R oga+rw /usr/lib/apache2/modules
source /etc/apache2/envvars
sudo apt-get install php5-dev