Skip to content

Instantly share code, notes, and snippets.

View anovsiradj's full-sized avatar

MDMCDC anovsiradj

View GitHub Profile
@anovsiradj
anovsiradj / datetime.bat
Last active April 12, 2017 05:37
Windows: cmd-datetime to Clipboard
:: DateTime to Clipboard
:: @author anovsiradj (http://ne-a-r.blogspot.com/ncr) <anov.siradj22@gmail.com>
:: @created 2016-05-04 , 09:23:44 (kerja3)
:: Result (in clipboard) yyyymmddhhii (no ss)
::pustaka
::http://ss64.com/nt/syntax-substring.html
::http://stackoverflow.com/questions/2772456/string-replacement-in-batch-file/2773504#2773504
::http://www.robvanderwoude.com/escapechars.php

Have you ever wanted to get a specific data from another website but there's no API available for it? That's where Web Scraping comes in, if the data is not made available by the website we can just scrape it from the website itself.

But before we dive in let us first define what web scraping is. According to Wikipedia:

Web scraping (web harvesting or web data extraction) is a computer software technique of extracting information from websites. Usually, such software programs simulate human exploration of the World Wide Web by either implementing low-level Hypertext Transfer Protocol (HTTP), or embedding a fully-fledged web browser, such as Internet Explorer or Mozilla Firefox.

So yes, web scraping lets us extract information from websites. But the thing is there are some legal issues regarding web scraping.

@anovsiradj
anovsiradj / comments.xhtml
Created August 5, 2017 17:04
NeAR Blogger Snippets
<h3 class='post-title entry-title pd-t-16 mg-t-8 mg-b-8 hidden-print' id='core_comments_nav'><span>Komentar</span>
<button class='btn btn-warning btn-xs bd-rad-0' data-toggle='tab' href='#comment-b' role='tab'>B</button>
<button class='btn btn-primary btn-xs bd-rad-0' data-toggle='tab' href='#comment-fb' role='tab'>FB</button>
<button class='btn btn-info btn-xs bd-rad-0' data-toggle='tab' href='#comment-disqus' role='tab'>Disqus</button>
</h3>
<div class='tab-content hidden-print' id='core_comments'>
<div class='tab-pane' id='comment-fb'><div class='fb-comments' data-numposts='5' data-width='100%' expr:data-href='data:post.url.canonical'/></div>
<div class='tab-pane active' id='comment-b'>
<b:if cond='data:post.commentSource == 1'>
<b:include data='post' name='iframe_comments'/>
@anovsiradj
anovsiradj / blog-main.xhtml
Last active January 14, 2018 12:43
yetkdance
<!--
Posts List (Index/Archive/Search/Label/Tag/Category)
Belum tahu apa fungsinya, jadi di matikan dulu
penempatan, dibagian paling bawah:
<b:include cond='data:top.showPlusOne' name='googlePlusBootstrap'/>
belum ada iklan, jadi dihapus dulu, lokasi dalam <loop> paling bawah:
<b:if cond='data:post.includeAd'><div class='inline-ad'><data:adCode/></div></b:if>
-->
@anovsiradj
anovsiradj / config.json
Last active September 27, 2017 03:46 — forked from anonymous/config.json
Joel (Global Intermedia Nusantara) Bootstrap Customizer Config for SIPKD
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@anovsiradj
anovsiradj / looper.less
Last active October 7, 2019 02:24
LESS: Loop dynamic selector rule (CSS)
.looper(@class, @property, @unit: px, @min: 0, @max: 10, @step: 1) {
.loop(@i) when (@i <= @max) {
@cls: e(replace(@class, '\*', @i, 'g'));
@{cls} {
@{property}: unit(@i, @unit);
}
.loop(@i + @step);
}
.loop(@min);
}
@anovsiradj
anovsiradj / system-fonts.less
Last active August 12, 2018 07:48
css system fonts
/*
using OS fonts.
order, each vendor, new to old.
apple,
linux,
android,
windows
default.
*/
@anovsiradj
anovsiradj / so_content_first.user.js
Last active June 29, 2018 15:10
StackOverflow: Content First
// ==UserScript==
// @name StackOverflow: Content First
// @description remove unused html elements on stackoverflow.
// @namespace https://gist.github.com/anovsiradj
// @version 2018.06.29
// @author Mayendra Costanov (anovsiradj)
// @include *://stackoverflow.com/questions/*
// @run-at document-end
// @grant none
// ==/UserScript==
{
"fastScroll": "1",
"arrowScroll": "1",
"spaceScroll": "0",
"noAutofocus": "1",
"autoInstall": "1",
"analyticsConsent": "0",
"docs": "apache_http_server/css/deno/html/http/javascript/jquery/laravel~9/less~4/mariadb/php/postgresql~15/dom/yii~2.0/composer/node/npm/sqlite"
}
@anovsiradj
anovsiradj / ncr.js
Last active March 19, 2020 15:06
[DEPRECATED] blogger / blogspot - NoCountryRedirect (NCR) always use ".com" instead ".co.id"
if(/.co.id/.test(window.location.hostname)) window.location.replace(window.location.href.replace('.co.id','.com/ncr'));