Skip to content

Instantly share code, notes, and snippets.

@stetic
stetic / gist:2929166
Created June 14, 2012 08:56 — forked from bkimble/gist:1365005
Delete local memcached keys with specific prefix using Ruby
#!/usr/bin/env ruby
require 'net/telnet'
key_prefix = 'www.your:prefix'
cache_dump_limit = 1000
localhost = Net::Telnet::new("Host" => "localhost", "Port" => 11211, "Timeout" => 3)
slab_ids = []
localhost.cmd("String" => "stats items", "Match" => /^END/) do |c|
matches = c.scan(/STAT items:(\d+):/)
@stetic
stetic / google-cloud-storage-upload-download.php
Last active September 25, 2023 19:20
PHP Example for Google Storage Upload and Download with Google APIs Client Library for PHP
<?php
/*
* PHP Example for Google Storage Up- and Download
* with Google APIs Client Library for PHP:
* https://github.com/google/google-api-php-client
*/
include( "Google/Client.php" );
include( "Google/Service/Storage.php" );

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name