sw_vers -productVersion
Clone all git repositories from BitBucket
[code]
#!/bin/bash
#Script to get all repositories under a user from bitbucket
#Usage: getAllRepos.sh [username]
curl -u ${1} https://api.bitbucket.org/1.0/users/${1} > repoinfo
for repo_name in `grep \"name\" repoinfo | cut -f4 -d\"`
do
git clone [email protected]:${1}/$repo_name.git
done
[/code]
Credit to Harold Soh (http://haroldsoh.com/2011/10/07/clone-all-repos-from-a-bitbucket-source/) for the original source.
Curl file to remote FTP
curl -T somefile.tar.bz2 ftp://example.com –user myuser:mypass
Fix WordPress “corrupted” serialized data
Using WP-Table-Reloaded I had an issue where the serialized data wouldn’t return properly.
I found a function that fixed this:
function fixSerialized($sObject)
{
$__ret =preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $sObject );
return $__ret;
}
Drupal 7 – Drush watchdog tail
drush watchdog-show –tail
Fix Alacarte errors when adding new menu items in LXDE + Ubuntu
Thanks to the post on AskUbuntu, I managed to fix this issue.
Simply run:
sudo apt-get install gnome-panel
In terminal to fix the problem.
Scan 192.168.0.x with NMAP for SSH (Port 22)
nmap -p 22 –open -sV 192.168.0.0/24
Force Sync Google Chrome Extensions
Click the three bars icon in the top right, then click Tools then Extensions. (Or chrome://chrome/extensions/)
Click Developer Mode.
Then click Update Extensions Now.
Bingo!
EVEMon with Wine on Ubuntu Linux
I’m using Ubuntu 12.10, but this can be done with earlier versions. I’m also using Wine1.5.
First, you’re going to want to grab wine1.5, this can be done via the PPA.
Then, run:
winetricks dotnet40 -q
This installs .NET 4.0 which EVEMon uses.
You can then run EVEMon.exe via wine:
wine EVEMon.exe
Drupal 7 – Get custom fields for a node/product
For example for Drupal Commerce: $data = field_info_instances(“commerce_product”,”product”);