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 - Format your external SSD as GUID partitioning using disk util on Mac | |
1 - Download and install VirtualBox | |
2 - Download Windows 10 ISO | |
3 - Run diskutil list and find out which is your external disk | |
4 - Type diskutil unmountDisk /dev/diskX where X is the number of your disk | |
5 - Open terminal and sudo su | |
6 - Run this to command to create a VirtualDisk that uses your external disk: | |
VBoxManage internalcommands createrawvmdk -filename "bootcamp.vmdk" -rawdisk /dev/diskX | |
7 - Still as root run: | |
/Applications/VirtualBox.app/Contents/MacOS/VirtualBox |
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
Pick an element in the HTML panel of the developer tools and type this in the console: | |
angular.element($0).scope() | |
In WebKit and Firefox, $0 is a reference to the selected DOM node in the elements tab, so by doing this you get the selected DOM node scope printed out in the console. | |
You can also target the scope by element ID, like so: | |
angular.element(document.getElementById('yourElementId')).scope() | |
Addons/Extensions |
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 dscl . -merge /Groups/admin GroupMembership username | |
sudo dscl . -append /groups/admin GroupMembership phackwer |
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
You will need: | |
1 - ViewController | |
2 - Scroll View | |
3 - Scroll content view | |
4 - Button (with text and image that will be replaced when you click) | |
5 - WebView | |
6 - Greyline at the bottom | |
In your layout, the Webview stays between the button and the grey line, with 0 height |
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
Requirements: | |
apt-get install pv original-awk | |
Creating: | |
tar cf - folder_you_will_compress -P | pv -s $(du -sb folder_you_will_compress | awk '{print $1}') | gzip > compressed_folder.tgz | |
Unpacking: | |
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 - Install supported version of docker and docker compose (in docker hosts too) | |
apt-get remove docker* | |
curl https://releases.rancher.com/install-docker/17.03.sh | sh | |
sudo curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
1 - Start your Rancher instance, locked for the outside world: | |
docker run -d --restart=unless-stopped --name rancher-server -p 0.0.0.0:8080:8080 rancher/server:stable |
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
#!/bin/bash | |
# expected to be defined in the environment | |
# - AZURE_STORAGE_ACCOUNT | |
# - AZURE_CONTAINER_NAME | |
# - AZURE_ACCESS_KEY | |
# - CURRDATE | |
# - FILE_EXTENSION | |
# - APP_ENV |
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
#!/bin/sh | |
alias errcho='>&2 echo' | |
if [ ! $REPO ]; then | |
errcho "No \$REPO to clone from; | |
exit 1; | |
fi | |
if [ ! $BRANCH ]; then |
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
grep -rl $'\xEF\xBB\xBF' `pwd` > file_with_boms.txt | |
while read l; do sed -i '1 s/^\xef\xbb\xbf//' $l; done < file_with_boms.txt |
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
find -type f -name "*.php" -exec php -l '{}' \; |