$ sudo apt-get install mediainfo
shortvideoinfo() {
mediainfo --Inform="General;Duration=%Duration/String3%\nFile size=%FileSize/String4%" "$@"
mediainfo --Inform="Video;Resolution=%Width%x%Height%\nCodec=%CodecID%" "$@";
}
#!/usr/bin/ruby | |
# Stub rails command to load rails from Gems or print an error if not installed. | |
require 'rubygems' | |
version = ">= 0" | |
if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then | |
version = $1 | |
ARGV.shift | |
end |
require 'uri' | |
require 'net/http' | |
url = URI("https://api.msg91.com/api/v2/sendsms") | |
http = Net::HTTP.new(url.host, url.port) | |
http.use_ssl = true | |
http.verify_mode = OpenSSL::SSL::VERIFY_NONE | |
request = Net::HTTP::Post.new(url) |
AddModelVirtualAttributeCheck: { } | |
AlwaysAddDbIndexCheck: { } | |
#CheckSaveReturnValueCheck: { } | |
#CheckDestroyReturnValueCheck: { } | |
DefaultScopeIsEvilCheck: { } | |
DryBundlerInCapistranoCheck: { } | |
#HashSyntaxCheck: { } | |
IsolateSeedDataCheck: { } | |
KeepFindersOnTheirOwnModelCheck: { } | |
LawOfDemeterCheck: { } |
class User | |
#=region Setup | |
devise :database_authenticatable | |
has_images :icon_image | |
codify( | |
harshal: { name: "Harshal" } | |
) | |
#=endregion | |
# frozen_string_literal: true | |
require "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
gem 'activerecord', '6.0.0.rc1' |
# frozen_string_literal: true | |
require "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
gem "rails" | |
gem "sqlite3" | |
end |
On Server | |
$ pg_dump -U dbadmin -d dbprd > ~/temp/db-backups/db-backup-14-feb-2018.pgsql | |
On Dev Machine | |
$ scp [email protected]:/home/deployer/temp/db-backups/db-backup-14-feb-2018.pgsql ./db-backup-14-feb-2018.pgsql | |
$ psql -U dbadmin -d development_database < db-backup-14-feb-2018.pgsql |
{ | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true | |
} |