- Add this file to
~/Library/Preferences/RiderXXXX.X/filetypes/Vagranfile.xml
- Restart IDE
This page will help you find the correct directory.
#!/bin/bash | |
# Exit if any command fails | |
set -e | |
# Check if script is run as root | |
if [ "$EUID" -eq 0 ] | |
then echo "Please do not run as root" | |
exit | |
fi |
# convert avi to mkv and set audio lang tags | |
# brew install mkvtoolnix | |
# loop all avi files in current folder | |
for file in *.avi; do | |
# replace original avi ext by mkv ext | |
mkv="${file%.*}.mkv" | |
# convert avi to mkv |
# copy postgres from one app db to another | |
heroku pg:copy sushi::ORANGE GREEN --app sushi-staging | |
# This would copy data from the ORANGE database of the sushi app to the GREEN database in sushi-staging. This could be used to copy production data into a staging app for testing purposes. | |
# source: https://devcenter.heroku.com/articles/heroku-postgres-backups#direct-database-to-database-copies |
#!/bin/bash | |
for FILE in *; do | |
echo "${FILE}" | |
duration=$(ffprobe -i "${FILE}" -show_entries format=duration -v quiet -of csv="p=0") | |
nth_second=$(echo "${duration} - 2.3" | bc) | |
ffmpeg -i "${FILE}" -ss 0.1 -to "${nth_second}" "fixed-${FILE}" | |
done |
~/Library/Preferences/RiderXXXX.X/filetypes/Vagranfile.xml
This page will help you find the correct directory.
generate(:scaffold, "post", "title:string", "body:text") | |
route "root to: 'posts#index'" | |
file 'config/database.yml', <<-CODE | |
default: &default | |
adapter: postgresql | |
encoding: unicode | |
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> | |
host: db |
select setval((select pg_get_serial_sequence('table_name', 'id')), (select max(id) from table_name)); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Get selected HTML</title> | |
<script> | |
function getSelectionHtml () { | |
var div, range, sel, result; | |
if (window.getSelection) { | |
sel = window.getSelection(); | |
} else if (document.selection) { |
<!-- data:text/html, --> | |
<html> | |
<head> | |
<title>Textr0n</title> | |
<style> | |
body { | |
margin: 0; | |
} |
# stop script on error signal | |
set -e | |
SITE="your-site-original-folder-name.com" | |
DEPL="/home/forge/deployments/${SITE}" | |
# create directory and any intermediate directories if don't exist | |
mkdir -p ${DEPL} | |
CUR="/home/forge/${SITE}" |