Skip to content

Instantly share code, notes, and snippets.

@tanaikech
tanaikech / submit.md
Last active February 19, 2024 15:32
Parsing HTML using Google Apps Script

Parsing HTML using Google Apps Script

This is a sample script for parsing HTML using Google Apps Script. When HTML data is converted to Google Document, the HTML data can be parsed and be converted to Google Document. In this case, the paragraphs, lists and tables are included. From this situation, I thought that this situation can be used for parsing HTML using Google Apps Script. So I could came up with this method.

In the Sheet API, the HTML data can be put to the Spreadsheet with the PasteDataRequest. But unfortunately, in this case, I couldn't distinguish between the body and tables.

The flow of this method is as follows. In this sample script, the tables from HTML are retrieved.

Flow

@oguzserdar
oguzserdar / referrer-spam-blacklist
Last active August 29, 2015 14:22
Stop the referrer spam
# This blacklist is ready to use in your site's root htaccess file
# Banned websites and crawlers
SetEnvIfNoCase Referer "^http://([a-z0-9\-]+\.)*semaltmedia\.com(/|:|$)" banned
SetEnvIfNoCase Referer "^http://([a-z0-9\-]+\.)*100dollars-seo\.com(/|:|$)" banned
SetEnvIfNoCase Referer "^http://([a-z0-9\-]+\.)*12masterov\.com(/|:|$)" banned
SetEnvIfNoCase Referer "^http://([a-z0-9\-]+\.)*4webmasters\.org(/|:|$)" banned
SetEnvIfNoCase Referer "^http://([a-z0-9\-]+\.)*7makemoneyonline\.com(/|:|$)" banned
SetEnvIfNoCase Referer "^http://([a-z0-9\-]+\.)*acads\.net(/|:|$)" banned
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@jnbn
jnbn / iller-array.php
Last active October 29, 2023 15:52
Türkiye Iller Array
<?php
$iller = array('','Adana', 'Adıyaman', 'Afyon', 'Ağrı', 'Amasya', 'Ankara', 'Antalya', 'Artvin',
'Aydın', 'Balıkesir', 'Bilecik', 'Bingöl', 'Bitlis', 'Bolu', 'Burdur', 'Bursa', 'Çanakkale',
'Çankırı', 'Çorum', 'Denizli', 'Diyarbakır', 'Edirne', 'Elazığ', 'Erzincan', 'Erzurum', 'Eskişehir',
'Gaziantep', 'Giresun', 'Gümüşhane', 'Hakkari', 'Hatay', 'Isparta', 'Mersin', 'İstanbul', 'İzmir',
'Kars', 'Kastamonu', 'Kayseri', 'Kırklareli', 'Kırşehir', 'Kocaeli', 'Konya', 'Kütahya', 'Malatya',
'Manisa', 'Kahramanmaraş', 'Mardin', 'Muğla', 'Muş', 'Nevşehir', 'Niğde', 'Ordu', 'Rize', 'Sakarya',
'Samsun', 'Siirt', 'Sinop', 'Sivas', 'Tekirdağ', 'Tokat', 'Trabzon', 'Tunceli', 'Şanlıurfa', 'Uşak',
'Van', 'Yozgat', 'Zonguldak', 'Aksaray', 'Bayburt', 'Karaman', 'Kırıkkale', 'Batman', 'Şırnak',
@Rarst
Rarst / r-debug.php
Last active February 3, 2024 17:30
R Debug (set of dump helpers for debug)
<?php
/*
Plugin Name: R Debug
Description: Set of dump helpers for debug.
Author: Andrey "Rarst" Savchenko
Author URI: https://www.rarst.net/
License: MIT
*/