Skip to content

Instantly share code, notes, and snippets.

View mercuryrain's full-sized avatar
🍌

Mercury Rain mercuryrain

🍌
View GitHub Profile
@mercuryrain
mercuryrain / boo.js
Created April 11, 2012 10:10
Bookmarklet to get branch name (original)
(function($,window,undefined){
var key = $("#key-val").text(),
descr = $("h1").text(),
errors = "",
sprintLabels = $.grep(jQuery("ul.labels li"),function(el){
return $(el).text().match(/sprint/);
});
if(!key.length) errors += "Key is not defined\n";
if(!descr.length) errors += "Description is not defined\n";
if(!sprintLabels.length) errors += "Sprint label is not defined\n";
@mercuryrain
mercuryrain / boo.js
Created April 11, 2012 09:40
Bookmarklet to get branch name
javascript:(function($,window,undefined){var key=$("#key-val").text(),descr=$("h1").text(),errors="",sprintLabels=$.grep(jQuery("ul.labels li"),function(el){return $(el).text().match(/sprint/);});if(!key.length)errors+="Key is not defined\n";if(!descr.length)errors+="Description is not defined\n";if(!sprintLabels.length)errors+="Sprint label is not defined\n";if(errors.length){alert(errors);return;}var sprint=$(sprintLabels[0]).text(),branchName=sprint+'_UA_'+key+'_'+descr.toLowerCase().replace(/\(\)/g,'').replace(/\W/g,'_').replace(/_+/g,'_').replace(/_$/g,'');window.prompt("Branch name:\n"+branchName+"\n"+"Create branch:\ngit checkout -b "+branchName,branchName);})(jQuery,window);
cd ~/Projects/sandiego/frontends/scripts
mysql -uroot -p12plok reporting_development<<EOFMYSQL
TRUNCATE TABLE reporting_tool_values;
EOFMYSQL
mysql -uroot -p12plok roswell_development<<EOFMYSQL
TRUNCATE vacatures;
EOFMYSQL
php add-demo-vacatures.php 1 10
cd ~/Projects/sandiego/platform/scripts
mysql -uroot -p12plok reporting_development<<EOFMYSQL
TRUNCATE TABLE reporting_tool_values;
EOFMYSQL
mysql -uroot -p12plok roswell_development<<EOFMYSQL
TRUNCATE jobseekers;
TRUNCATE form_cvs;
EOFMYSQL
@mercuryrain
mercuryrain / 1376.sh
Created February 15, 2012 12:10
1376.sh
if [ "$1" = "1" ]
then
cd ~/Projects/sandiego/platform/scripts
mysql -uroot -p12plok reporting_development<<EOFMYSQL
TRUNCATE TABLE reporting_tool_values;
EOFMYSQL
mysql -uroot -p12plok roswell_development<<EOFMYSQL
@mercuryrain
mercuryrain / 2079.sh
Created February 8, 2012 16:07
2079.sh
cd ~/Projects/sandiego/platform/scripts
php add_company_and_employer.php 1 [email protected] 111111 company1 1
php add_vacature.php 1 [email protected]
cd ~/Projects/sandiego/
./rebuild-solr.sh
cd ~/Projects/sandiego/platform/scripts
mysql -uroot -p12plok reporting_development<<EOFMYSQL
TRUNCATE TABLE reporting_tool_values;
EOFMYSQL
mysql -uroot -p12plok roswell_development<<EOFMYSQL
TRUNCATE jobseekers;
TRUNCATE file_cvs;
EOFMYSQL