04 November 2010

c# script to delete very large second stage recycle bin items in sharepoint 2007

In SharePoint 2007, when item versioning is set to no limit for a document library, you could easily have a spiraling content database size.  When you try delete a ginormous item, it'll eventually get stuck in the second stage recycle bin, and you'll never be able to reclaim that database space or file space - a forced purging of the recycle bins through a UI operation will time out eventually, rolling back a huge transaction, probably freezing the site for your users - cue fire and brimstone.

The solution is to run the following script off-hours.  Off hours helps minimize any potential blocks SQL server may issue against database pages as it goes around deleting the row content from alldocversions - from what I can tell, many I/O Page Latch locks are issued when SQL is deleting blobs, so to be nice to this script and run it off hours.  Compile it into a c# console application referencing the sharepoint dll. There isn't much for progress reporting included in the script, but if you can figure out how many rows you are removing from alldocversions, you can keep issuing the t-sql command 'sp_helpdb alldocversions' to keep a tab on the progress.


using System;
using Microsoft.SharePoint;

namespace DeleteRecycleBin
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter Site Url (example: http://site) and press enter.");

            string siteUrl = Console.ReadLine();

            try
            {
                SPSecurity.RunWithElevatedPrivileges(delegate()
                {
                    using (SPSite site = new SPSite(siteUrl))
                    {
                        //SPRecycleBinQuery recycleQuery = new SPRecycleBinQuery();
                        //recycleQuery.ItemState = SPRecycleBinItemState.SecondStageRecycleBin;
                        //recycleQuery.OrderBy = SPRecycleBinOrderBy.Default;

                        //SPRecycleBinItemCollection recycledItems = site.GetRecycleBinItems(recycleQuery);
                        //int count = recycledItems.Count;

                        SPRecycleBinItemCollection recycledItems = site.RecycleBin;

                        int count = recycledItems.Count;
                        while (count-- > 0)
                        {
                            recycledItems.Delete(new Guid[] { recycledItems[count].ID });
                        }

                        Console.WriteLine("All items deleted.");
                    }
                });
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error: " + ex);
                Console.WriteLine("");
                Console.WriteLine("Press enter to continue.");
                Console.ReadLine();
            }
        }
    }
}

28 September 2010

sharepoint trick to edit "new item form" by adding to url

Hide columns on NewForm, DispForm, EditForm in SharePoint list

To remove columns from appearing on a display, edit item, and new item form in SharePoint lists, e.g.:


The goal is to add some JavaScript into a Content Editor Web Part (CEWP) on the above page.

To add web parts to any page within Sharepoint:
On the URL of the form page you are, add to the end of it: &toolpaneview=2 (i.e. Or remove all the stuff (querystring) stuff at the end of URL and change it to DispForm.aspx?toolpaneview=2. The page will then change to Edit Mode:


From here, add a CEWP, content editor web part, to the page UNDER the form already on the page. This is very important, if will not work if the CEWP is not under the form. Modify the CEWP, open the source editor, and paste in:
<script type="text/javascript">
var containers =  document.getElementsByTagName("*");
for (var i=0;i<containers.length;i++)
 {
 if (containers[i].innerText == 'Recurrence' || containers[i].innerText == 'Workspace')
  {
  if(containers[i].tagName == 'H3')
   {
       containers[i].parentNode.parentNode.style.display = 'none';
   }
  if(containers[i].tagName == 'NOBR')
   {
   containers[i].parentNode.parentNode.parentNode.style.display = 'none';
   }
  }
 }
</script>
Save and close it. Now, the columns should be gone! Another quick tip, if you need to hide any other columns, in the code above find the section:
containers[i].innerText == 'Recurrence' || containers[i].innerText == 'Workspace'
For each column you need to hide, append it like this:
containers[i].innerText == 'Recurrence' || containers[i].innerText == 'Workspace' || containers[i].innerText == 'Title'
The code above will also hide the Title column. If you want to hide just one, remove the pipe characters ( || ) around each statement and remove all but the one you need:
containers[i].innerText == 'Location'





adapted from Kevin's post here.

27 August 2010

Win 7 & SharePoint fix: webdav Explorer (windows explorer view's) slow performances issue



Since upgrading any client to Windows 7, SharePoint's Windows Explorer view got really really slow. Guess what, it has to do with IE 8's (maybe IE7 too) automatic proxy detection, not SharePoint.  You might experience this slowness connecting to any webdav server, including my iPhone's.

Here is the fix:
  1. In Internet Explorer, open the Tools menu, then click Internet Options.
  2. Select the Connections tab.
  3. Click the LAN Settings button.
  4. Uncheck the “Automatically detect settings” box.
  5. Click OK


28 July 2010

Grilled Thick Lamb Chops with Stout-Citrus Glaze





Grilled Thick Lamb Chops with Stout-Citrus Glaze


Time: 45 minutes
1 cup stout of your choice
1/4 cup balsamic vinegar
1 tablespoon grated lemon zest
2 tablespoons fresh lemon juice
Salt
8 thick (about 1 1/2 inches) lamb rib or loin chops
2 tablespoons olive oil
Black pepper.
1. Combine stout, vinegar, lemon zest, lemon juice and salt in a small, heavy-bottomed saucepan. Bring to a boil over high heat, then reduce heat to medium and simmer vigorously until reduced to about 1/4 cup syrup, 20 to 25 minutes.
2. Meanwhile, build a fire on one side of a grill. When fire has died down, and coals are medium-hot (you can hold your hand 5 inches above grill grate for about 2 seconds), move enough coals to other side of grill to form a single layer, leaving most coals on hot side.
3. Rub lamb with oil, sprinkle generously with salt and pepper, place directly over hot part of grill and sear well, about 2 minutes a side. Move chops to cooler side of grill. Brush side facing up with glaze and cook for 4 minutes; turn over, brush other side generously with glaze and cook about 4 minutes more for medium-rare. To check for doneness, make a 1/4-inch cut in thickest part of one chop; it should be slightly less done than you like it.
4. Remove chops from grill, cover them loosely with foil, and let rest for 5 minutes. Brush again with glaze just before serving.

21 July 2010

Semiya Vada from the South Indies

Ingredients:

Channa Dal (coarsely ground)
Chopped Onion
Green chillies chopped
Garlic chopped
Ginger chopped
Curry leaves
Vermicelli (roasted)
Cumin
Fennel
Salt
Oil

Method :

Mix channa dal, salt, chopped onion, chopped green chillies, chopped ginger, chopped garlic and chopped curry leaves.
Roll into balls
Coat with roasted vermicelli and flatten into cakes
Deep fry in hot oil
Serve with a chutney dip


06 May 2010

San Francisco Trivia for Drupalers

A friend of mine was in town for the DrupalConSF and asked me about some San Francisco history. Thus it seems appropriate to publish some of the lesser known historical tidbits about SF that I've been meaning to resend out for awhile. Hope you enjoy & learn about SF, or use this in a drinking game/trivia night, etc. Credits to Stacey Irvine - an amazing and curious person - from Parody, of the Dive Bar Club fame.

san francisco trivia

The Questions Answers
Why was Lawrence Ferlinghetti arrested in 1956 on obscenity charges? He published Alan Ginsburg's Howl
Why was Abe Warner famous for his Cobweb Palace at Meig's Wharf? He refused to do anything to hurt a spider, including sweeping away cobwebs
Why is San Francisco Sourdough unique, and can't be made elsewhere? The yeast that gives it that unique San Francisco flavor won't grow anywhere else
Why is it said that Colma has more dead people than live ones? That's where all the cemeteries are
Why did the ship, Asia, carry 321 embalmed bodies of dead Chinese from San Francisco to Hong Kong in 1858? They wanted to be buried in China, not the US
Why did Morton Street become Maiden Lane after everything burned down in the 1906 fire? Changing the name was supposed to change the primary line of business practiced on Maiden Lane (prostitution)
Who wrote this? "I saw the best minds of my generation destroyed by madness, starving hysterical naked, dragging themselves through the negro streets at dawn looking for an angry fixÖ" Allen Ginsberg, "Howl"
Who wrote Tales of the City? Armistead Maupin
Who wrote "The Devil's Dictionary" & lived in the old Russ Hotel in San Francisco? Ambrose Bierce
Who were/are The Diggers? 1960s street theatre/anarchist guerilla theatre group
Who were the Big 4 Railroad Barons? Leland Stanford, Mark Hopkins, Charles Crocker and Collis P. Huntington
Who was the first settler in North Beach? Juana Briones in 1836
Who was the first president of the Sierra Club (founded in San Francisco)? John Muir
Who was the first Postmaster General in San Francisco? John White Geary
Who was the Dowager Widow of the Emperor Norton, Empress of San Francisco and Protectress of Mexico? JosÈ Saria, first openly gay candidate for City office (1961)
Who was Sister Boom Boom and what was her profession (as listed on election documents) Mayor candidate who listed her profession as "Nun of the Above"
Who was San Francisco's first professional masochist? Oofty Goofty who allowed people to punch him for 5cents & slam him in the butt with a baseball bat for a quarter.
Who was Sally Stanford? Famous San Francisco Madam
Who was Julia Morgan? San Francisco architect who designed Hearst Castle (among other things)
Who was famous for doing business at Waverly Place? Ah Toy & Belle Cora, two of San Francisco's most famous madams
Who suggested that Lincoln marry Queen Victoria in order to facilitate US/Great Britain relations? Emperor Norton. Lincoln's secretary cabled a response saying that Lincoln would consider the suggestion.
Who started Del Monte & where did he do it? Genoese Marco J. Fontana at the Cannery
Who said "I'd rather be an old man's darling than a young man's slave?" Big Alma, who modeled for the risquÈ statue in Union Square
Who runs the Sts. Peter & Paul Church? Salesian Order of St. John Bosco, the patron saint of youth
Who ran a hot potato stand at Pier 39? Dan White
Who paid Emperor Norton's rent? The local Masonic lodge
Who owns City Lights Bookstore? Lawrence Ferlinghetti
Who made a vow to erect one statue with a water fountain for every 100 saloons in San Francisco? Henry Cogswell, who made his money installing gold crowns on teeth of miners who wanted to show off their Gold Rush fortunes
Who led a demonstration of 600 people across Golden Gate Bridge to call attention to the need for suicide barriers on the bridge? Jim Jones, who later led the largest mass suicide of modern times
Who launched the Gold Rush by running through Portsmouth Square and announcing "Thar's Gold in them thar hills!" Samuel Brannan
Who killed Artie Mitchell (of the Mitchell Brother's O'Farrell Theater)? His brother, Jim Mitchell
Who is the family photographer to San Francisco's fetish community? Charles Gatewood
Who is San Francisco named after? St. Francis of Assissi
Who is Lawrence Ferlinghetti? Owner of City Lights bookstore
Who is Jack Fertig more commonly known as? Sister Boom Boom
Who invented the cable car system? Andrew Hallidie
Who haunts the Moss Beach Distillery? Virginia Rappe, actress supposedly raped with a bottle by Fatty Arbuckle. She bled to death.
Who got Samuel Brannan's money? His wife, after the divorce. Sam died penniless.
Who got himself stuck in the rigging of the Balclutha? Jonathan Winters
Who founded the Bank of America? Amadeo Peter Giannini
Who founded COYOTE (Call Off Your Old Tired Ethics) a prostitute's rights organization Margo St. James
Who employed Sara Jane Moore (who fired two shots at President Ford? In 1975?) FBI
Who died when the piano at the Condor Club smashed an amorous couple against the ceiling? The bouncer (the girl survived)
Who did Lotta Crabtree (of Lotta's Fountain fame) marry? No one
Who cursed Fox Plaza? Anton Le Vey
Who created Zippy the Pinhead? San Franciscan, Bill Griffith
Which pier does the ferry thing to Alcatraz? Pier 41
Which church was featured in Cecil DeMille's movie, The Ten Commandments? Sts. Peter & Paul Church across from Washington Square
Which Church has the inscription "Son, Observe the time and fly from Evil" St. Mary's Cathedral, Grant & California
Which bank did General William Tecumseh Sherman build? Bank of Lucas, Turner & Company, 800-804 Montgomery
Where were three cases of Gold Rush era champagne found in 1976? In the ship's hold of the Niantic, a ship abandoned for the Gold Rush
Where was the People's Temple (Jim Jones, minister)? 1859 Geary between Fillmore & Steiner
Where was the first structure of Yerba Buena village? Clay & Grant, a tent (later an adobe) built by English sailor William Richardson
Where was the first San Francisco City Hall? Jenny Lind theatre, off Portsmouth Square
Where was Patty Hearst held during most of her abduction? 1827 Golden Gate #6, between Baker & Broderick
Where was Gibbath Olum Cemetery a Jewish cemetery? Church & Dolores, between 19th & 20th
Where was gangster Babyface Nelson apprehended? The ladies' room of the San Francisco Brewing Company
Where was Emperor Norton's Imperial Palace? Empire Park, between 650 & 632 Commercial St.
Where was Butcher town? 3rd & EvansÖthe name came from the many slaughterhouses in the area
Where was Ann Rice's vampire interviewed? 503 Divisidero @ Fell
Where was "Murderer's Corner" named for the large number of murders at that location? Jackson & Kearney
Where is/was the first Roman Catholic cathedral on the Pacific Coast? St. Mary's Cathedral, 600 California @ Grant Ave
Where is William Leidesdorf buried? Under the floor of the sanctuary in Mission Dolores
Where is Washerwoman's Lagoon? Cow Hollow little lake located in the area roughly bounded by Franklin, Octavia, Filbert and Lombard Streets
Where is the San Francisco City Tree (a 100 foot tall Monterey Cypress)? In front of McLaren Lodge in Golden Gate Park
Where is the oldest continuously operating farmer's market in the state of California? Almaney, in it's 55th year at it's present location, 59th year since it started
Where is the Museum of Money? Basement of the Bank of California, 400 California St.
Where is the Grateful Dead house? 710 Ashbury @ Waller
Where is the first commercial dynamite factory in the United States Glen Canyon Park, State Historical Landmark 1002
Where is Powell Street? Downtown by the cable car turnaround & also in the Presidio (yes, there are two of them)
Where is Geek Street? Any map published by Carto Graphics
Where is a steel & granite sculpture of Sun Yat-sen? St. Mary's Park, bounded by Pine, California & Quincy
Where is a cemetery in San Francisco? Mission Dolores, San Francisco Columbarium, San Francisco National Cemetery (Presidio), Presidio Pet Cemetery
Where does Zegnatronic Frank Chu live? Oakland
Where does Beach Blanket Babylon play? Club Fugazi on Green Street
Where do San Francisco's homeless get private rooms with room service, TVs & aquariums? Maddie's Pet Adoption Center @ the SFPCA
Where do bike messengers hang out in the Financial District? The Wall at Sansome & Sutter
Where did the term 'Hatchet Men' come from? Name given to enforcers for Chinatown tongs
Where did the Mud People wander (covered in nothing but mud & talking only in grunts)? Financial District
Where did the first legal execution in San Francisco take place? Russian Hill, Jose Forni in 1852
Where did Ronald Reagan work during WWII? Building 201, Fort Mason
Where did real estate appreciate such that one lot sold for $16.50 in 1847, then $6k in early 1848 & later again that same year for $45k? Adjacent to Portsmouth Square
Where did Philo T. Farnsworth (inventor of television) go to college? One semester at Brigham Young University
Where did most of the Chinese immigrants come from? Guangdong province
Where did Miles Archer die? (first murder of the Maltese Falcon) Burritt St, SW of Stockton & Bush
Where did Karen Finley (performance artist) get her start? Dancing at the Condor Club
Where did Joe DiMaggio grow up? North Beach
Where did Jim Jones & Rosalyn Carter have tea together? Stanford Court Hotel, 905 California
Where did Janis Joplin live in San Francisco? 112 Lyon Street, between Page & Oak
Where did Jack Dempsey once work at a bouncer? San Francisco Brewing Company
Where did Emperor Norton die? California & DuPont/Grant, across from St. Mary's Church
Where can you visit a WWII submarine in San Francisco? The USS Pampanito is at Pier 45
Where can you order an x-rated cake? The Cake Gallery, 9th & Folsom
Where can you hear live opera for the price of a cup of coffee? Saturdays at CafÈ Trieste
Where can you find wild parrots in San Francisco? Telegraph Hill
Where can you find a whale penis bone in San Francisco? Above the fireplace at the Merchant's Exchange club (465 Commercial St.)
Where can you bowl and go ice skating in San Francisco today? Yerba Buena, by Moscone
Where can a herd of real, live, buffalo be found in San Francisco? Golden Gate Park
Where are two giant crosses in San Francisco - one on City property? Mt. Davidson & the Prayer book Cross in Golden Gate Park
Where are the tunnels underneath Chinatown? They didn't exist.
Where are Charles (notorious gambler) and Belle (high priced Madam) Cora buried? Mission Dolores Cemetery
When was the Chinatown Gate (Grant Ave @ Bush) built? 1970
When was the American flag first raised over San Francisco & by whom? Captain John B. Montgomery in 1846, arriving from the USS Portsmouth
When was the 1906 earthquake? 5:12AM, April 18
When was Mission Dolores founded? 1776
When the ship Euphemia was abandoned, what did it become? (ship was abandoned when the sailors abandoned it for the gold fields) A prison & a "receptacle for the insane"
When did topless dancing start in San Francisco? June 19, 1964 @ the Condor Club
When did the Old Mint quit minting money? 1932
When did the Loma Prieta quake hit? 5:04 P.M., Tuesday, October 17, 1989
When did the Golden Gate Bridge open? 13662
When did the first person jump from Golden Gate Bridge? (first suicide) August 7, 1937, Harold Wobber
When did the first Europeans sail through the Golden Gate? August, 1775
When did the cows get kicked out of Cow Hollow? Board of Health made a decree in 1891
When did the Bay Bridge open? 13466
When did Emperor Norton proclaim himself Emperor of the United States? 1859
When and where does the Fire Dept. give out free Blood Mary's & Screwdrivers? 5am-ish at Lotta's Fountain on April 18
What's 'wrong' with the San Francisco Art Institute bell tower? It's haunted
What were Carol Doda's measurements? 44-22-36
What was the population of Yerba Buena in 1846? 400
What was the population of San Francisco in 1848? At the end of 1849? 900; 20k
What was the population of San Francisco in 1846, before the Mormons arrived? After? approx 200 with the Mormons adding 220
What was the original Bank of America called? Bank of Italy
What was the original name of Columbus Ave? Montgomery Ave
What was the Lively Flea? An elegant French bordello on Commercial St.
What was the Ghirardelli Chocolate Factory before it was a chocolate factory? Pioneer Woolen Mill
What was the first club to go topless in North Beach? Condor
What was Sudsofloppen? A feminist consciousness raising group
What was San Francisco's first gay bar? The Dash, (Pacific & Kearney)opened in 1908
What was San Francisco called before it was called San Francisco? Yerba Buena
What was North Beach known as before 1910? The Latin Quarter
What was Lillie Coit's favorite fire company? Knickerbockers Company #5
What was found under the Palace of the Legion of Honor Museum in 1993? ~300 coffins dating from the Gold Rush
What was Emperor Norton's title? Emperor of the United States and Protector of Mexico
What was Anton LeVey (founder of the Church of Satan)'s birth name? Howard Stanton Levey
What was "International Settlement" & why was it off limits to armed forces personnel? Pacific Ave, off limits because of the 'nightclubs'
What used t o be underneath Civic Center? A cemetery
What surgeon & "good ventriloquist" had a street named after him? William J. Powell
What stands in the middle of Union Square? Dewey Monument, commemorating President McKinley & Admiral Dewey
What San Francisco socialite shaved her head so her wigs would fit better? Lillie Hitchcock Coit
What San Francisco native invented television? Philo Taylor Farnsworth (1906-1971)
What San Francisco business has the motto "If you want something done right, sometimes you have to do it yourself" Good Vibrations
What North Beach nightspot was the model for the bar in the original Star Wars movie? Specs
What North Beach native married Marilyn Monroe? Joe DiMaggio
What movie did the Balclutha ship appear in? Mutiny on the Bounty
What material is used for stopping (braking) the cable cars? Wood
What is the total land area of San Francisco? 47.6 square miles
What is the tallest building in San Francisco? How tall is it? Transamerica Pyramid, 853 feet
What is the steepest street in San Francisco with a 31.5% grade? Filbert Street between Hyde and Leavenworth and 22nd Street between Church and Vicksburg
What is the oldest street in San Francisco? Grant Ave
What is the oldest stone federal building on the West Coast? Old Mint
What is the oldest continuously operating bar in San Francisco? The Saloon at 1232 Grant Ave which started as Wagner's Beer Hall in 1861
What is the oldest building in San Francisco? Mission Dolores, built 1791
What is the official San Francisco City Bird? California Quail
What is the official motto of San Francisco? Oro en Paz, Fierro en Guerra (Gold in Peace, Iron in War)
What is the highest point in San Francisco? Mt. Davidson
What is the City Flower of San Francisco? The Dahlia
What is the better known name for Mabel Marcia Busby Goodan Fansier Bayhaam Spagnoli Rapp Gump Kenna Sally Stanford
What is the average yearly rainfall of San Francisco? 19.33 inches year
What is the address of the St. Peter & Paul Catholic Church next to Washington Square? 666 Filbert
What is Nihonmachi ? Japantown
What is Mayor Willie Brown's middle name? Lewis
What is Grant Ave's original name? Originally: Calle de la Fundacion then Dupont Street
What is Frank Chu's shoe size? 7.5 or 8
What is Coit Tower a monument to? Fire fighters
What is Balmy Street famous for? Murals
What hotel inspired a section of Allen Ginsberg's 'Howl' (with the aid of peyote) Sir Francis Drake Hotel
What heads of state died at the Palace (now Sheraton) Hotel? Warren G. Harding (1923) & King David Kalakaua, reigning monarch of Hawaii (1891)
What does it mean to "jayhawk a webfoot'? Rob a newly arrived Oregonian
What does 'Yerba Buena' mean? "Good Herb' in Spanish, named for the sweet mint that used to grow here
What do Carol Doda & Harry Callahan have in common? 44, (44DD for Carol Doda's bra size and 44 Magnum for Dirty Harry's favorite gun)
What do builders often find when excavating for new construction in the Financial District? Ships abandoned in the 1849 Gold Rush.
What did Samuel Brannan do before running through Portsmouth Square announcing the Gold Rush? Cornered the market on picks, axes and other gold panning materials
What did Melvin Belli do whenever he won a big case? Hoist a Jolly Roger flag & shoot a cannon
What did Melvin Belli do during a long running dispute with his law partners? Trained his dogs to urinate & defecate outside his partner's offices
What did Kimberly Guilfoyle do before becoming an attorney & marrying Gavin Newsome? Model lingerie
What did Emperor Norton decree to be the penalty for calling San Francisco 'Frisco' 25
What did Charlie Crocker do to 'encourage' his neighbor, Mr. Yung, to sell 25 feet of ground next to Crocker's Nob Hill mansion? Enclosed Mr. Yung's house with a 40 foot tall fence.
What defense did Dan White successfully use during his trial for murdering Harvey Milk & George Moscone? The Twinkie Defense (too much sugar made him crazy)
What bar has a jukebox containing nothing but opera? Tosca's
What bank robber left poems in exchange for the money he stole? Black Bart (Charles E. Bolton)
What are the San Francisco city colors? Black & Gold
What are the names of the famous twins who walk through Union Square & around the Financial District wearing matching 1940s hair, hat & dress? Marian and Vivian Brown
What are Beach Blanket Babylon performers famous for? Big hats. Size matters.
What African American woman used voodoo & sexual blackmail to become a powerful, influential figure in late 19th century San Francisco? Mammy Pleasant
Oofty Goofty would plaster himself with feathers as a part of what act? His 'Wild Man of Borneo" act
Name two North Beach businesses in continuous operation since the earthquake & fire of 1906 Figone Hardware & French Italian Bakery
Name two famous lesbian bars in San Francisco. Lexington Club & Wild Side West
Name two owners of those famous lesbian bars in San Francisco. Daughter of Mayor Willie Brown & Carolyn Carpeneti
Name the first African American citizen of San Francisco to have a street named after him William A. Leidesdorff
Lillie Coit's will paid for a statue of three firemen in Washington Square Park. What was one of the firemen holding when the statue was unveiled? A half empty bottle of whiskey
James Lick made his money by buying worthless sand dunes which became Montgomery Street. Even after becoming millionaire, he never changed his suit. He gave a good chunk of his fortune to establish what? The Lick Baths where the poor could bathe free of charge.
In which building can the tide be seen to rise & fall at the bottom of the elevator shaft? old Belli Building, 722 Montgomery
In the opening scene of Dirty Harry, where did the sniper shoot from? Carnelian Room , 52nd Floor of B of A building (Montgomery & California)
In 1884, of 31,700 residents of Chinatown, how many were women? 1380
If you're at Washington Square Park at 7am, what are you likely doing? Thai Chi
How the† Tenderloin get its name? From the long-ago days when cops on patrol the received premium pay for their efforts, and were thus able to afford prime cuts of meat.
How much does it cost to ride Muni? 1.5
How much does an average parking meter bring in revenue each year (not counting tickets)? 580
How many versions of the Cliff House have there been? The current one is #5
How many ships were floating or beached in Yerba Buena cove in 1849? 600, most of them left to rot or be scavenged
How many ships arrived in San Francisco Bay between April and December of 1849? (45 of them on one day, almost all ships were abandoned upon arrival) 549
How many registered vehicles are there in San Francisco? How many legal parking spaces are there? 453,903 registered vehicles for 603,000 spaces
How many public sex clubs are there in San Francisco? Two: Power Exchange (74 Otis St. location temp closed since Nov 2008) & Club Eros
How many named hills are in San Francisco? 43
How many Muddy Waters Coffee shops are there in San Francisco? Three
How many curves on Vermont St.? 6
How many curves on Lombard St.? 8
How many accidents/day for Muni? 7/day in 1995/6 (latest year for public figures)
How does the pedestrian-death-by-auto rate compare to the murder rate? four to one
How did Union Square get its name? Many pro-Union (where 'union' refers to Civil War Union side) demonstrations in the area
How did the Montadon house on Lombard Street become haunted? (mysterious fires, door locking themselves, two suicides and one unexplained death, etc)? When the owner had a party, didn't bring the tarot card reader a drink & got cursed
How did Mark Twains' character, Tom Sawyer, get his name? From a San Francisco firefighter who Mark Twain (Samuel Langhorne Clemens) met at the Bank Exchange saloon in the Montgomery block
How did Hearst get the San Francisco Examiner? As payment for a gambling debt
How did Emperor Norton lose his fortune? By trying to corner the rice market just before 3 ships full of the stuff arrived in San Francisco
How did Alcatraz get its name? Mangling of the Spanish word for Albatross
How did Condor Club dancers get around a city ordinance prohibiting the display of pubic hair? Shaving. Down there.
Coit Tower stands on top of which hill? Telegraph Hill
Before Union Square was Union Square, what was it called? O'Farrell's Mountain because it was a giant sand bank

09 April 2010

The almighty comes down to two nude statues in a park and says






"For a short period of time, I will bring you to life, and you can do whatever you would like to do."






So these two statues come to life.






They jump into a large set of bushes.  There is all kinds of rustling and banging around in the bushes.






And of course the almighty peers around the bushes in time to see the male statue say to the female statue, 






"Okay, now you hold down the pigeon, and I'll shit on it!"


a. thomas schomberg

26 February 2010

guacamole recipe, central mexican styled

Colibri's Guacamole, from Jonathan Kakacek


1.5 avocado
1 to 1.5 Tablespoons of each
-onion chopped
-jalapenos chopped
-cilantro
-tomato

teaspoon of salt or to taste
.5 tsp 1.5 lime (juice, cut in half, use fork to poke and squeeze/twist)

mix in a folding action and tah dah


19 February 2010

Locking down Actions in SharePoint 2007 like Edit in Datasheet, Export to Spreadsheet

Among the many requests we get to compose or decompose some of the basic functionality built into SharePoint 2007 - we get this one a lot.  For some very valid business reasons, Edit in Datasheet or Export to Spreadsheet (Excel / Access) violate some of the metadata rules or workflow customizations that may affect metadata.  I think this is due to the lack of robust field level security tied out to the users or groups in SharePoint.  It's not too hard to build this into SharePoint (most serious web applications have field level security), and I've even helped build field level security into a few widely employed web applications. So maybe its due to something else.  Either way, to disable the functionality, you basically gut SharePoint's webservices from the set of users you want to lock it down for.

  1. Go to [your site] > Site Settings > Permissions > Permission Levels


      1. Note: to do this for a single list, break permission inheritance at the list, then apply the new Permission Level to the Groups or Users that you want to restrict

  2. Add a permission level or click on an existing permission level (to copy to a new permission level as a template)
  3. Remove the following permissions from the list

  • Use Remote Interfaces - Use SOAP, Web DAV, or SharePoint Designer interfaces to access the Web site.  (To stop the people from linking to the list with Access, etc.)
  • Use Client Integration Features - Use features which launch client applications. Without this permission, users will have to work on documents locally and upload their changes.  (To remove Edit in Datasheet. This also removes Export to Spreadsheet)

There are other ways involving the javascript jquery library that I'm not as fond of here. Doug Ware from Elumenotion wrote up a few choices, and is on point with his write up.

18 February 2010

Upgrading custom sharepoint 2007 workflows in progress

From what research I've done, it seems safe to upgrade (via solution deployment) previously associated, deployed, and running SharePoint 2007 Custom Workflows (developed in Visual Studio) that are In Progress.

The two key areas why I think this works is to do with the content that SharePoint hydrates each time a workflow moves into and out of memory.  In old-fashioned programmer speak, the program section and data section are saved with each instance of a workflow.  In current lingo, I understand Extensible Application Markup Language (XAML) is used to represent SharePoint workflow objects in XML thereby allowing the instances of all the data objects and the program code to be streamed into and out of memory in perpetuity.  If you think about how challenging this is to accomplish, you'll understand why I really respect this aspect of SharePoint, and how it adds to the awesomeness of skill displayed by their development team. 

Caveat emptor: dehydration and rehydration saves many things about the state of the workflow and the code of the workflow, but there could be nonserializable objects that your workflow may depend on that can change whilst the workflow is dehydrated (out of memory/not running).  e.g. SPList is nonserializable.  Worst case scenario, you'll have to prepare the business users to restart broken workflows.

Read more details on this in Chapter 9 of David Mann's awesome book Workflow in the 2007 Microsoft Office System - Using workflow in SharePoint and Office 2007 to enforce and enhance business processes. I highly recommend this book for developers doing custom development on SharePoint Workflows.  It's very well written, and a fun read (which is always tough with a deeply technical book).


10 February 2010

Dhal with Spinach recipe

Dhal with Spinach by Juliana Madan (my mamma!)


1 cup of any kind of dhal -- cook in pressure cooker with the following
1/2 tsp tumeric
1/2 tsp cumin
1 chopped tomato
2 Jalepenoes sliced
You may need 1 or 1 & 1/2 cups of water to cook.
After 10 mins or slow turn off & let it cool
Add 1 or 2 bunches of chopped spinach into cooker & simmer till cooked.

For seasoning
Heat 2 TBSP oil
Add 1 tsp mustard seeds-- when they pop crackles add the following ingredients to the oil
2 red dry chillies
1 onion chopped
Pour on top of cooked dhal
Add coriander leaves for garnish



06 February 2010

Ribs recipe

Sandhya Chib's Famous Ribs


1 c chopped onion
2 tbsp olive oil
Few dry red chillis (break them in half if you really want the heat)
3 cloves garlic
1/2 c white vinegar
3/4 c packed brown sugar
1/3 c soy sauce
1/2 c chilli sauce
Heat oil. Fry chillis. Add onion, fry 5 mins, add rest of ingredients, bring to boil. Remove from heat, pour over ribs, bake at 350 for one hour. Baste couple times. Turn up to 500 at end and brown for two mins.





09 January 2010

michelin 2010 san francisco bib restaurant guide, redux


Hi 2010, now where is my HAL 9000 I was sci-fi-promised!?  HAL: "The 9000 series is the most reliable computer ever made. No 9000 computer has ever made a mistake or distorted information. We are all, by any practical definition of the words, foolproof and incapable of error."

Why the redux?
So I remember in 1992 thinking, why do some people think html is difficult? Later that decade, I recall seeing the first copy of html for dummies (and screaming in agony).  I think that might have been the reference manual the coders at michelin.com still use - or they might just be using Microsoft Word 1997's "Publish as a Complete Web page" to do their famously anonymous site.  View source.

What is a bib?
A Bib Gourmand rating means the restaurant is an inspector's favorite for good value. For $40 or less, you can enjoy two courses and a glass of wine or dessert (not including tax and gratuity).

San Francisco 2010 Bib Gourmand Restaurants (the filterable, ad-free redux)





also, I like this guy: