Skip to content

Instantly share code, notes, and snippets.

View vlados's full-sized avatar
🎯
Working on new projects

Vladislav Stoitsov vlados

🎯
Working on new projects
View GitHub Profile
@vlados
vlados / switch-php.md
Created March 26, 2022 21:44
Simple function to do everything needed to switch easily php version

Switch PHP Version in Laravel Valet

Simple function to do everything needed to switch easily php version

Install

Add this function in your .zshrc file:

# Switch PHP version
switch-php() {
    readonly port=${1:?"Please specify php version"}
 valet use php@$1
@vlados
vlados / yotube download
Last active June 11, 2018 16:20
yotube download playlist to mp3
playlists=( "list_id" )
for i in "${playlists[@]}"
do
youtube-dl --audio-format mp3 -i -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' --add-metadata -x --audio-quality 0 --prefer-ffmpeg 'https://www.youtube.com/playlist?list='${i} --format bestaudio --username USERNAME --password PASSWORD --download-archive downloaded.txt --no-post-overwrites -ciwx --geo-bypass --geo-bypass-country BG
done
@vlados
vlados / gist:23c828643ce6ac8b71ce18835b6198f9
Last active June 6, 2017 07:32
Clean annoying _notes folders from dremweaver
find . -name "_notes" -type d -empty -delete
I found a security breach in Intercom.io – by using only app_id for initiating application you can get all the conversations
of every system which is using Intercom!
How: Basically you can get the app_id of every application using Intercom by just search in their HTML, check which users are
created in Intercom for that application_id and initiate the intercom with this app_id and user_id. Eureka! You have all his
conversations! This is what I call a huge problem!