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
# Convert iso to img | |
hdiutil convert -format UDRW -o crucial-c400.040H.04.00.img crucial-c400.040H.04.00.iso | |
# Get the disk id | |
diskutil list | |
# Copy files to drive | |
dd if=./crucial-c400.040H.04.00.img.dmg of=/dev/rdisk2 |
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
#!/bin/bash | |
if [ $(id -u) != 0 ]; then | |
echo "This script must be run as root." | |
exit 1 | |
fi | |
drupal_path=${1%/} | |
drupal_user=${2} | |
httpd_group="${3:-www-data}" |
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
VBoxManage list runningvms | |
VBoxManage controlvm {foobar} poweroff |
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
// Get IDs | |
gmap_tool = jQuery('#tools .view-partners-map .gmap').attr('id').split('-')[1] | |
gmap_home = jQuery('#page-content .view-partners-map .gmap').attr('id').split('-')[1] | |
// Resize fix | |
google.maps.event.trigger(Drupal.gmap.getMap('auto2map').map, "resize") | |
// Add map styles | |
Drupal.gmap.getMap('auto2map').map.setOptions({styles: styles}); |
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
Drupal.behaviors.loginAJAXSubmit = { | |
attach: function (context, settings) { | |
var ajax = Drupal.ajax[$('#tab-login .form-submit').attr('id')]; | |
if(typeof ajax != 'undefined'){ | |
$('input',ajax.element_settings.element.parentElement.parentElement).bind("keypress", function (e) { | |
var code = (e.keyCode ? e.keyCode : e.which); | |
if(code == 13) { //Enter keycode | |
$(ajax.element_settings.element).trigger(ajax.element_settings.event); | |
} | |
}); |
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
// GMap Functional Overrides | |
if(Drupal.gmap !== undefined) { | |
// Set boot options | |
Drupal.gmap.addHandler('gmap', function (elem) { | |
var obj = this; | |
obj.bind("boot", function () { | |
obj.map.setOptions({ | |
styles: styles, | |
mapTypeControl: false, | |
scrollwheel: false |
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
git log -p ./filename.js |
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
git log --name-status |
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
var BLITZ_englishPath, | |
BLITZ_languageFormInputs = document.getElementById('lang-dropdown-form').firstChild.children; | |
for (var i = 0; i < BLITZ_languageFormInputs.length; i++) { | |
if(BLITZ_languageFormInputs[i].name === 'en'){ | |
BLITZ_englishPath = BLITZ_languageFormInputs[i].value; | |
break; | |
} | |
} |
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
shopt -s dotglob | |
sudo chmod -R -v -N ~/ | |
sudo chown -R -v $(whoami):staff ~/ | |
sudo chmod -R -v 700 ~/ | |
sudo chmod -v 755 ~/ |