brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
%w(rubygems sequel fileutils yaml active_support/inflector).each{|g| require g} | |
require File.join(File.dirname(__FILE__), "downmark_it") | |
module WordPress | |
def self.import(database, user, password, table_prefix = "wp", host = 'localhost') | |
db = Sequel.mysql(database, :user => user, :password => password, :host => host, :encoding => 'utf8') | |
%w(_posts _drafts images/posts/featured).each{|folder| FileUtils.mkdir_p folder} |
/** | |
* Converts a simpleXML element into an array. Preserves attributes and everything. | |
* You can choose to get your elements either flattened, or stored in a custom index that | |
* you define. | |
* For example, for a given element | |
* <field name="someName" type="someType"/> | |
* if you choose to flatten attributes, you would get: | |
* $array['field']['name'] = 'someName'; | |
* $array['field']['type'] = 'someType'; | |
* If you choose not to flatten, you get: |
mysql databasename -u [root] -p[password] -e 'show tables like "wp_153_%"' | grep -v Tables_in | |
| xargs mysqldump [databasename] -u [root] -p[password] > [target_file] |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
<apex:page standardStylesheets="false" showHeader="false" sidebar="false" standardController="Merchandise__c" extensions="MobileInventoryExtension" recordSetVar="products"> | |
<!-- stylesheets and scripts, from CDN (use local files in production) --> | |
<apex:stylesheet value="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.1.0/jquery.mobile-1.1.0.min.css" /> | |
<apex:includeScript value="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"/> | |
<apex:includeScript value="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.1.0/jquery.mobile-1.1.0.min.js"/> | |
<head> | |
<title>Mobile Inventory</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> | |
<script> |
<!-- Main page, to display list of Merchandise once app starts --> | |
<div data-role="page" data-theme="b" id="mainpage"> | |
<!-- page header --> | |
<div data-role="header"> | |
<!-- button for logging out --> | |
<a href='#' id="link_logout" data-role="button" data-icon='delete'> | |
Log Out | |
</a> | |
<!-- page title --> | |
<h2>List</h2> |
// handle successful retrieval of Merchandise records | |
function onSuccessSfdcMerchandise(response) { | |
// avoid jQuery conflicts | |
var $j = jQuery.noConflict(); | |
// debug info to console | |
SFHybridApp.logToConsole("onSuccessSfdcMerchandise: received " + response.totalSize + " merchandise records"); | |
// clear div_merchandise_list HTML | |
$j("#div_merchandise_list").html(""); |
<!-- Detail page, to display details when user clicks specific Merchandise record --> | |
<div data-role="page" data-theme="b" id="detailpage"> | |
<!-- page header --> | |
<div data-role="header"> | |
<!-- button for going back to mainpage --> | |
<a href='#mainpage' id="backInventory" class='ui-btn-left' data-icon='home'> | |
Home | |
</a> | |
<!-- page title --> | |
<h1>Edit</h1> |
// handle clicks to Update on detailpage | |
$j("#updateButton").click(function() { | |
// update local information in the inventory array | |
inventory[$j("#detailpage").attr("data-id")].Quantity__c = $j("#quantity").val(); | |
currentRecord = inventory[$j("#detailpage").attr("data-id")]; | |
// strip out ID before updating the database | |
var data = new Object(); | |
data.Quantity__c = currentRecord.Quantity__c; | |
// update the database |
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
""" | |
This script was moved to | |
https://github.com/pklaus/pklaus/blob/master/pklaus/images/orphans/remove.py | |
Here's the original content left for you as a reference: | |
Do you own a DSLR? If so, do you transfer your images to your computer, | |
then look at the JPEGs and delete the crappy ones? If you do, your RAW |