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
| #!/usr/bin/env php | |
| <?php | |
| /** | |
| * Here's a little script that will extract images from MS Access DB exported as XML file. | |
| * It uses XMLReader basically to extract big XML files. Tested on 1.11GB file size | |
| */ | |
| function xmlparser($file, $saveTo = '') { | |
| $wrapperName = 'Photo'; |
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
| sudo find / -name ".DS_Store" -depth -exec rm {} \; |
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
| # | |
| # FIX for Capistrano's SSH error "Net::SSH::AuthenticationFailed error" | |
| # This is a common error that you might encounter when working with Capistrano from one environment to another, | |
| # especially if Capistrano is configured to deploy on a password-less authentication. | |
| # | |
| # The fix: specify the authentication eg. auth_methods | |
| # | |
| set :ssh_options, {:forward_agent => true, :auth_methods => 'publickey'} |
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 | |
| # Checkout master, fetch origin and merge changes to master | |
| find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git checkout master && git fetch origin && git merge origin/master" \; |
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 | |
| iptables --flush | |
| # Open the following ports 80, 443, 8080 or add your own | |
| iptables -A INPUT -p tcp -m tcp --sport 80 -j ACCEPT | |
| iptables -A INPUT -p tcp -m tcp --sport 443 -j ACCEPT | |
| iptables -A INPUT -p tcp -m tcp --sport 8080 -j ACCEPT | |
| # Allow any outgoing requests |
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 | |
| sudo dbus-uuidgen > /var/lib/dbus/machine-id |
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
| java -jar selenium-server-standalone-2.39.0.jar -htmlSuite "*firefox /usr/lib64/firefox/firefox-bin" "http://somedomain.com" "/path/to/TestSuite.html" "/path/to/test/results.html" |
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/sh | |
| KERNEL="vmlinuz-grsec" | |
| INITRD="initramfs-grsec" | |
| CMDLINE="alpine_dev=cdrom:iso9660 modules=loop,squashfs,sd-mod,usb-storage,sr-mod,earlyprintk=serial console=ttyS0" | |
| MEM="-m 1G" | |
| IMG_CD="-s 3,ahci-cd,alpine-3.2.3-x86_64.iso" | |
| PCI_DEV="-s 0:0,hostbridge -s 31,lpc" | |
| LPC_DEV="-l com1,stdio" |
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
| IFS=$'\n';for f in `find .`; do file=$(echo $f | tr [:blank:] '_'); [ -e $f ] && [ ! -e $file ] && mv "$f" $file;done;unset IFS |
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
| tr -cd 'A-Za-z0-9_-' |
OlderNewer