-
Mac OS X
system settings
>Security & Privacy
>privacy
tab -
Select Full Disk Access and click plus icon.
-
Add terminal in the list ( in my case iTerm)
-
Restart iTerm
-
Run command in iterm:
$ cd /private/etc && sudo touch ./exports
-
Start virtual machine trough vargrant: Profit
This file contains 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
""" | |
This is a small python script to clear up old gitlab build artifacts. | |
There are 3 variables you should modify: | |
* base_url: path to your gitlab | |
* access_token: your personal access token to make gitlab api calls | |
* delete_everything_older_than: configure the timedelta as you wish | |
!!IMPORTANT!! | |
By default this script does only make dry-runs and does not actually delete any files! |
This file contains 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
#0 d8 site: node/1 comment form with full html input format by uid0. | |
<script>alert('XSS')</script> | |
_________________________________________________________________________________________________ | |
#1 d8 site: node/1 comment form with full html input format by uid0. | |
It will move the site into maintenance mode | |
<script>setTimeout(function(){ | |
jQuery.get('/drupal_test/admin/config/development/maintenance', | |
function (data, status) { | |
if (status == 'success') { |
This file contains 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
<?php | |
/** | |
* @file | |
* Preprocess and suggestions for a Drupal sub-theme. | |
* | |
*/ | |
use Drupal\node\NodeInterface; | |
use Drupal\media\MediaInterface; |
This file contains 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
#!/usr/bin/env bash | |
# 1. Skip steps if you already have the tools listed | |
# 2. Run source ~/.bashrc or source ~/.zshrc after each step to ensure command is registered | |
# Install Homebrew, if not installed | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Update Homebrew installed packages | |
brew update && brew upgrade |
This file contains 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
# One liner | |
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
# Explained | |
wget \ | |
--recursive \ # Download the whole site. | |
--page-requisites \ # Get all assets/elements (CSS/JS/images). | |
--adjust-extension \ # Save files with .html on the end. | |
--span-hosts \ # Include necessary assets from offsite as well. | |
--convert-links \ # Update links to still work in the static version. |
This file contains 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
# Pass the env-vars to MYCOMMAND | |
eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
# … or ... | |
# Export the vars in .env into your shell: | |
export $(egrep -v '^#' .env | xargs) |
This file contains 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
sudo aptitude install ruby-full | |
sudo gem install sass | |
sudo gem install compass |
This file contains 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
{# Get URL of single file field #} | |
{{ node.field_file.entity.uri.value }} | |
{# Get URL of multi file field #} | |
{{ node.field_file['#items'].entity.uri.value }} | |
{# Trun into link #} | |
{{ file_url(node.field_file.entity.uri.value) }} | |
{# Check if there is at least one value #} |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
NewerOlder