I just really want to copy and paste the code from that presentation.
Yes, I'm still using PHP.
I just really want to copy and paste the code from that presentation.
Yes, I'm still using PHP.
#!/usr/bin/perl | |
my %counts = () ; | |
while (my $cmd = <STDIN>) { | |
chomp $cmd ; | |
if (!$counts{$cmd}) { | |
$counts{$cmd} = 1 ; | |
} else { | |
$counts{$cmd}++ ; | |
} |
require 'rubygems' | |
require 'oauth' | |
require 'yaml' | |
CONSUMER_KEY = '' | |
CONSUMER_SECRET = '' | |
def get_access_token | |
p "get_access_token: Initializing Consumer" | |
consumer = OAuth::Consumer.new(CONSUMER_KEY, CONSUMER_SECRET, { |
from scrapy import log | |
from scrapy.spider import BaseSpider | |
from scrapy.contrib.spiders import CrawlSpider, Rule | |
from scrapy.selector import HtmlXPathSelector | |
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor | |
from icone.items import Product | |
class IconeSpider(CrawlSpider): |
Make the spiders work!
This topics of the documentation are a must read to understand how everything works.
# After | |
def clean(i_list): | |
""" | |
Generate a string from a list stripped all the extra whitespace | |
""" | |
r_list = [string.strip() for string in i_list] | |
return ' '.join(r_list) | |
# Before |
#!/bin/bash | |
# Always use -n to test | |
# Variables | |
REMOTE_PATH='' | |
SSH='' | |
LOCAL_PATH='' | |
rsync -a -z -v --progress --delete -e ssh $SSH:$REMOTE_PATH $LOCAL_PATH |
#!/bin/bash | |
date_stamp=$(date +%y-%m-%d-%H-%M-%S) | |
WP_PATH='' | |
DB_NAME='' | |
DB_USER='' | |
DB_PASS='' | |
BACKUP_PATH='' | |
mkdir ${BACKUP_PATH}/${date_stamp} |
#! /bin/bash | |
# I hate wordpress </3 | |
# http://www.oldsiteurl.com | |
# http://www.newsiteurl.com | |
if [[ $# -lt 2 ]]; then | |
echo 'Please, provide the following parameters: [old_url] [new_url]' | |
echo '' | |
echo 'For example: ' |