Do you need remove files in the active_storage rails?
Use this files :)
on run {input, parameters} | |
set paths to "" | |
repeat with i from 1 to length of input | |
set cur to item i of input | |
set paths to paths & " " & quote & POSIX path of cur & quote | |
end repeat | |
set cmd to "vim -p" & paths | |
tell application "iTerm" | |
set created to false | |
if not (exists current window) then |
# Return a named route to current url requested | |
def route_name | |
Rails.application.routes.router.recognize(request) do |route, _| | |
return route.name.to_sym | |
end | |
end |
const race = (milliseconds, ...promises) => {
const timeout = new Promise((resolve, reject) => {
setTimeout(() => reject(`Limit operation excedded (limit: ${milliseconds} ms)`), milliseconds)
})
return Promise.race([timeout, ...promises])
}
$ rails new APP_NAME -d postgresql --skip-action-mailbox --skip-action-text --skip-spring --webpack=react -T --skip-turbolinks
# config/application.rb
config.generators do |g|
g.test_framework false
g.stylesheets false
if (!Date.prototype.toDatetimeLocal) { | |
(function () { | |
Date.prototype.toDatetimeLocal = function () { | |
var date = this | |
var ten = function (i) { | |
return (i < 10 ? '0' : '') + i; | |
} | |
if (date == 'Invalid Date') return false |
for file in app/views/**/*.erb; do html2haml -e $file ${file%erb}haml && rm $file; done
export function deepOmit(obj, excludes) { | |
const result = {} | |
excludes = Array.isArray(excludes) ? excludes : [excludes] | |
for (let i in obj) { | |
if (Array.isArray(obj[i])) { | |
const nextValue = obj[i].map(arrItem => { | |
if (isObject(arrItem)) { | |
return deepOmit(arrItem, excludes) | |
} |