This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = async () => { | |
const publicRole = await getRoleByName('Public') | |
grantPermissions(publicRole, 'application', 'images', ['upload', 'remove']) // upload, remove in 'images' controller | |
grantPermissions(publicRole, 'application', 'project') // any action in 'project' controller | |
}; | |
async function getRoleByName(name) { | |
return strapi.query('role', 'users-permissions').findOne({ name }, []) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lottieIeFixer (el, perspective) { | |
if (typeof perspective === 'undefined') { | |
perspective = 'width'; | |
} | |
if (!window.navigator.userAgent.indexOf('Windows') > -1 && | |
!window.navigator.userAgent.indexOf('rv:11.0') > -1) { | |
return; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enable ssh-agent automatic launch and sharing between multiple git-bash instances | |
# | |
# Env vars used | |
# SSH_AUTH_SOCK - ssh-agent socket, should be set for ssh-add or git to be able to connect | |
# SSH_AGENT_PID - ssh-agent process id, should be set in order to check that it is running | |
# SSH_AGENT_ENV - env file path to share variable between instances of git-bash | |
SSH_AGENT_ENV=~/ssh-agent.env | |
# import env file and supress error message if it does not exist | |
. $SSH_AGENT_ENV 2> /dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::save as .bat, drag and drop video | |
::converts 10 bit MKV (or whatever ffmpeg supports) to 8 bit MP4 | |
::before converting anything take a closer look at MAP param | |
::maybe you dont need to map anything at all (leave as 'set MAP=') | |
::subtitles copied as mov_text too | |
set IN=%1 | |
set OUT="%~dp1e_%~nx1" | |
set MAP=-map 0:0 -map 0:2 -map 0:4 | |
ffmpeg.exe -i %IN% %MAP% -c:v h264_nvenc -preset default -pix_fmt yuv420p -crf 23 -c:a copy -scodec mov_text -c:s copy -copy_unknown -c:v h264_nvenc -y %OUT% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ; | |
import android.content.Context; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.ViewGroup; | |
public class LinearLayoutPagerManager extends LinearLayoutManager { | |
private int mItemsPerPage; |