This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deleteRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); | |
var values = rows.getValues(); | |
var rowsDeleted = 0; | |
for (var i = 0; i <= numRows - 1; i++) { | |
var row = values[i]; | |
if (row[0] == 'delete' || row[0] == '') { // This searches all cells in columns A (change to row[1] for columns B and so on) and deletes row if cell is empty or has value 'delete'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onOpen() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var menuEntries = []; | |
menuEntries.push({ name:"Text to columns", functionName:"textToColumns" }); | |
menuEntries.push({ name:"Text to columns (custom separator)", functionName:"textToColumnsCustom" }); | |
menuEntries.push(null); | |
menuEntries.push({ name:"Columns to Text", functionName:"columnsToText" }); | |
menuEntries.push({ name:"Columns to Text (custom separator)", functionName:"columnsToTextCustom" }); | |
ss.addMenu("Advanced", menuEntries); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function(){ | |
function scrollToAnchor(aid){ | |
var aTag = jQuery("a[name='"+ aid +"']"); | |
jQuery('html,body').animate({scrollTop: aTag.offset().top},'slow'); | |
} | |
jQuery("#menu-item-243").click(function() { // Item to click | |
scrollToAnchor('kontakt'); // Item to scroll to | |
}); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE wp_options SET option_value = replace( option_value, 'URL_move_from', 'URL_move_to' ) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'URL_move_from','URL_move_to'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'URL_move_from','URL_move_to'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onOpen() { // find where date maches today, then scroll to the end of sheet, then scroll back to matched date | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getActiveSheet(); | |
var values = sheet.getSheetValues(1,1,1,sheet.getMaxColumns()); | |
var objvalues = Transpose(values); | |
var today = new Date().setHours(0,0,0,0); // change date format to numbers | |
for(var n=0;n<objvalues.length;++n){ // for each objvalues object run command |