Archivo del Autor: juanchorossi
iPhone: Sync Gmail, Calendar and Contacts on iPhone since January 30th
Sync contacts with your iOS device
To sync your Google contacts with your Apple iOS device (iPhone, iPad, iPod touch), we recommend using CardDAV, which is an Internet open standard. When you sync your Google contacts using CardDAV, you’ll be able to edit, add, and remove contacts from your device and keep them in sync everywhere you use them.
Here’s how to sync your contacts to your device:
- Open the Settings application on your device.
- Select Mail, Contacts, Calendars.
- Select Add Account…
- Select Other
- Select Add CardDAV Account
- Fill out your account information in the following fields:
- Server: Enter “google.com”
- User Name: Enter your full Google Account or Google Apps email address.
- Password: Your Google Account or Google Apps password. (If you’ve enabled 2 Step verification, you’ll need to generate and enter an application specific password.)
- Description: Enter a description of the account (e.g. Personal Contacts).
- Select Next at the top of your screen.
- Make sure that the “Contacts” option is turned to ON.
After you’ve completed setup, open the Contacts app on your device, and syncing will automatically begin.
Setting Google contacts as your default account
If you have set up iCloud, are syncing contacts from another account, or already have contacts stored on the device, you will need to select a Default Account.
Set your default account
- Open the Settings application on your device.
- Select Mail, Contacts, Calendars and scroll down to the Contacts section. You will only see the Default Account option if you are syncing more than one account.
- Select Default Account.
- Select your Google contacts account. Your account will be labeled with the description you gave it in the Description field.
New and existing contacts
New contacts created directly on your iOS device will be added to your default account.
Existing contacts should be imported into Google contacts. If your contacts are stored on an Apple device, you can transfer your contacts using vCard files. If your contacts are stored with another provider, first export your contacts and thenimport your contacts into Gmail.
Troubleshooting steps
If you have any problems, please try these things first:
- Open the CardDAV account you established at Settings > Mail, Contacts, Calendars under Accounts. Make sure that the Account option is turned to ON.
- If the Account is ON, then open Advanced Settings below and make sure Use SSL is turned to ON.
- If you have changed anything, please click Done and the top right of the screen showing your account settings to save those changes.
- If you’re still experiencing issues syncing your contacts using CardDAV, please login to your Google account on the web. You might be prompted to acknowledge an “Unusual sign-in location”.
Sync Google Calendar with your iOS device
CalDAV is an internet standard that’s used to sync Google Calendar with your Apple iOS devices (including iPhone, iPad, and iPod Touch) and iCal.
Getting started
- Open the Settings application on your device’s home screen
- Open Mail, Contacts, Calendars
- Select Add Account…
- Select Gmail
- Enter your account information:
- In the Name field, enter your name as you’d like it to appear to others.
- In the Email field, enter your full Google Account or Google Apps email address.
- In the Password field, enter your Google Account or Google Apps password.
- If you are a 2-step verification user, please use an application-specific password instead of your regular password in this field.
- In the Description field, enter a description of the calendar (e.g. “Personal Calendar”).
- Select Next at the top of your screen.
- Make sure the Calendars option is turned on.
After you’ve completed setup, open the Calendar app on your device. Syncing will automatically begin.
By default, only your primary calendar will be synced with your device. If you have additional calendars you’d like to sync, follow the instructions below.
Sync Multiple Calendars
- Visit the following page from your device’s mobile browser:https://www.google.com/calendar/syncselect
- (Google Apps users can go to
https://www.google.com/calendar/hosted/your_domain/syncselect, replacing ‘your_domain’ with your actual domain name)
- (Google Apps users can go to
- Select the calendars you’d like to sync, then click Save.
The selected calendars will be displayed on your device at the time of the next sync.
Everything Is A Remix: KILL BILL
Source: http://vimeo.com/19469447
Ofelia Feliz para emprendedoras :)

IPTables: Prevent crawlers and add to blacklist

iptables -N badguys iptables -A badguys -p tcp --dport 80 -m recent --set --name badlist -j LOG --log-prefix Adding to the badlist iptables -N block iptables -I INPUT ! -i lo -p tcp --dport 80 -j block iptables -I bam -p tcp --syn --dport 80 -m recent --name badlist --update --seconds 600 -j DROP iptables -I badguys -p tcp --dport 80 -m recent --name goodguys --update --rsource -j RETURN iptables -A bam -p tcp --dport 80 -m string --algo bm --string ofeliafeliz -j badguys iptables -I badguys -m limit --limit 10/s --limit-burst 10 -j RETURN
Funny Google 4XX Error
cURL: Print Headers Only
juancho@juancho-laptop:~$ curl -I -L http://www.lanacion.com HTTP/1.1 301 Moved Permanently Content-Length: 150 Content-Type: text/html; charset=UTF-8 Location: http://www.lanacion.com.ar/ Server: Microsoft-IIS/7.5 X-ORI: w9 X-Powered-By: ASP.NET Date: Thu, 28 Feb 2013 21:01:46 GMT Connection: close HTTP/1.1 200 OK Cache-Control: public, must-revalidate, max-age=900 Content-Type: text/html Last-Modified: Thu, 28 Feb 2013 20:56:02 GMT Vary: Accept-Encoding Response-Flush: No X-ORI: w1 X-Powered-By: ASP.NET Date: Thu, 28 Feb 2013 21:02:12 GMT X-Varnish: 3357640651 3357411539 Age: 368 Via: 1.1 varnish Connection: keep-alive X-CAMINO: UA_BOTS X-Cache: HIT 1653 X-EPV: v8
- -I : when used, CURL prints only the server response’s HTTP headers, instead of the page data.
- -L : if the initial web server response indicates that the requested page has moved to a new location (redirect), CURL’s default behaviour is not to request the page at that new location, but just print the HTTP error message. This switch instructs CURL to make another request asking for the page at the new location whenever the web server returns a 3xx HTTP code.
MySQL: Enable general log
set global log_output = 'TABLE'; truncate table mysql.general_log; set global general_log = 'ON'; SELECT * FROM mysql.general_log; /* Para desactivarlo */ set global general_log = 'OFF;
Using perl MySQL Tuner
MySQLTuner is a script written in Perl that allows you to review a MySQL installation quickly and make adjustments to increase performance and stability. The current configuration variables and status data is retrieved and presented in a brief format along with some basic performance suggestions.
juancho@juancho-laptop:~$ perl < (GET https://raw.github.com/rackerhacker/MySQLTuner-perl/master/mysqltuner.pl)
>> MySQLTuner 1.2.0 - Major Hayden >> Bug reports, feature requests, and downloads at http://mysqltuner.com/ >> Run with '--help' for additional options and output filtering Please enter your MySQL administrative login: root Please enter your MySQL administrative password: -------- General Statistics -------------------------------------------------- [--] Skipped version check for MySQLTuner script [OK] Currently running supported MySQL version 5.5.29-0ubuntu0.12.04.1 [OK] Operating on 64-bit architecture -------- Storage Engine Statistics ------------------------------------------- [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster [--] Data in MyISAM tables: 1G (Tables: 763) [--] Data in InnoDB tables: 113M (Tables: 78) [--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17) [!!] Total fragmented tables: 86 -------- Security Recommendations ------------------------------------------- [OK] All database users have passwords assigned -------- Performance Metrics ------------------------------------------------- [--] Up for: 16h 50m 51s (10K q [0.171 qps], 852 conn, TX: 15M, RX: 2M) [--] Reads / Writes: 98% / 2% [--] Total buffers: 192.0M global + 2.7M per thread (151 max threads) [OK] Maximum possible memory usage: 597.8M (10% of installed RAM) [OK] Slow queries: 0% (0/10K) [OK] Highest usage of available connections: 8% (13/151) [OK] Key buffer size / total MyISAM indexes: 16.0M/572.6M [OK] Key buffer hit rate: 99.9% (1M cached / 971 reads) [OK] Query cache efficiency: 44.4% (3K cached / 8K selects) [OK] Query cache prunes per day: 0 [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1K sorts) [OK] Temporary tables created on disk: 21% (159 on disk / 734 total) [OK] Thread cache hit rate: 98% (15 created / 852 connections) [!!] Table cache hit rate: 9% (400 open / 4K opened) [OK] Open file limit used: 76% (786/1K) [OK] Table locks acquired immediately: 100% (7K immediate / 7K locks) [OK] InnoDB data size / buffer pool: 113.8M/128.0M -------- Recommendations ----------------------------------------------------- General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance MySQL started within last 24 hours - recommendations may be inaccurate Enable the slow query log to troubleshoot bad queries Increase table_cache gradually to avoid file descriptor limits Variables to adjust: table_cache (> 400)
Print IP’s access from Apache domlog
juancho@juancho-laptop:~$ log="/root/domlogs_list"; dir="/usr/local/apache/domlogs"; > $log; num=$(find $dir -type f -name "*_log" | wc -l); echo "There are $num log files."; read -p "How many do you want outputted?: " howmany; read -p "How many IPs per domain would you like listed? " perdomain; echo $(date) | tee -a $log; find $dir -maxdepth 1 -mindepth 1 -type f ! -name "*_log" -exec bash -c "grep -cH "$(date +%d)\/$(date +%b)" {}" -print \; | sort -t\: -k 2 -rnu | sed 's/\(.*\)\:\([[:digit:]]\+\)/\2 \1/' | head -n $howmany | awk '{print $2}' | while read domain; do echo "----------------------------------------------------------------" | tee -a $log; echo $domain | tee -a $log; echo -e "# of requests\t\tIP address\t\tDomain name (if available)" | tee -a $log; grep "$(date +%d)\/$(date +%b)" $domain | awk '{print $1}' | sort | uniq -c | sort -rn | head -n $perdomain | awk '{print $1 " " $2}' | while read num ip; do rev=$(dig -x $ip +short); echo -e "$num\t\t$ip\t\t$rev" | tee -a $log; done; done
There are XX log files.
How many do you want outputted?: 1
How many IPs per domain would you like listed? 1
Tue Feb 26 10:42:21 ART 2013
----------------------------------------------------------------
/usr/local/apache/domlogs/xxx.com
# of requests IP address Domain name (if available)
8505 66.249.73.23 crawl-66-249-73-23.googlebot.com.
971 65.55.24.214 msnbot-65-55-24-214.search.msn.com.
605 201.231.198.85 85-198-231-201.fibertel.com.ar.
513 65.55.52.117 msnbot-65-55-52-117.search.msn.com.
503 157.55.32.144 msnbot-157-55-32-144.search.msn.com.
492 157.55.36.50 msnbot-157-55-36-50.search.msn.com.
484 157.55.32.95 msnbot-157-55-32-95.search.msn.com.

