Skip to content

Instantly share code, notes, and snippets.

View radub's full-sized avatar
🎯
Focusing

Radu Barbu radub

🎯
Focusing
View GitHub Profile
@nz
nz / Delete all documents in a Solr index using curl.md
Last active November 13, 2024 01:24
Delete all documents in a Solr index using curl
# http://wiki.apache.org/solr/FAQ#How_can_I_delete_all_documents_from_my_index.3F
# http://wiki.apache.org/solr/UpdateXmlMessages#Updating_a_Data_Record_via_curl

curl "http://index.websolr.com/solr/a0b1c2d3/update?commit=true" -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'

I'm amused at the traction this little gist is getting on Google! I would be remiss not to point out that six+ years later I'm still helping thousands of companies on a daily basis with their search index management, by providing managed Solr as a service over at Websolr, and hosted Elasticsearch at Bonsai. Check us out if you'd like an expert helping hand at Solr and Elasticsearch hosting, ops and support!

@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git
@alch
alch / .htaccess
Last active October 2, 2024 07:48
Symfony full .htaccess file
# For a symfony application to work properly, you MUST store this .htaccess in
# the same directory as your front controller, index.php, in a standard symfony
# web application is under the "public" project subdirectory.
# Use the front controller as index file.
DirectoryIndex index.php
# Uncomment the following line if you install assets as symlinks or if you
# experience problems related to symlinks when compiling LESS/Sass/CoffeScript.
# Options +FollowSymlinks
@molotovbliss
molotovbliss / removeOrphanFKs-m2.php
Last active March 9, 2021 14:08
Magento version 1 & 2, Locate Orphaned Records by Foreign Keys, and display SQL to Remove them.
<?php
// USE WITH MAGENTO 2.X
// Edit function call with DB details
// Usage: php removeOrphanFKs.php
// Used in conjunction with Magento Data Migration Tool
//
// Original script from: David Grudl (https://github.com/dg/MySQL-check)
// Modified by: Jared Blalock (http://molotovbliss.com)
//
@rafaelstz
rafaelstz / 1step-Install-Deployer-Magento2-BitbucketPipelines.md
Last active September 12, 2024 22:05
Automated deploy using Magento 2 + Bitbucket Pipelines + Deployer

Use both files in your root folder and run:

curl -LO https://deployer.org/deployer.phar && sudo mv deployer.phar /usr/local/bin/dep && sudo chmod +x /usr/local/bin/dep
composer require deployer/recipes --dev
composer require rafaelstz/deployer-magento2 dev-master --dev