Skip to content

Instantly share code, notes, and snippets.

View admariner's full-sized avatar

Periklis Papanikolaou admariner

  • admariner
  • Thessaloniki
View GitHub Profile
@admariner
admariner / notion2blog.js
Created May 11, 2020 03:21 — forked from mayneyao/notion2blog.js
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "agodrich.com"
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2"
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
@admariner
admariner / .gitignore
Created May 31, 2020 06:14 — forked from Yomguithereal/.gitignore
Hacker News scraper artoo.js bookmarklet
node_modules
build
*.min.js
@admariner
admariner / obsidian.css
Created June 1, 2020 08:10 — forked from seanwcom/obsidian.css
Bear.app stylings for Obsidian
/*
This now lives in a proper repo: https://github.com/seanwcom/Red-Graphite-for-Obsidian
*/
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
# Scrape Shopify themes using scrapy.org
#!pip install scrapy
#%%writefile shopify_theme_spider.py
import scrapy
class ShopifyThemeSpider(scrapy.Spider):
name = 'bshopifyspider'
start_urls = ['https://themes.shopify.com/themes?page=1']
# Scrape Shopify themes using scrapy.org
#!pip install scrapy
#%%writefile shopify_theme_spider.py
import scrapy
class ShopifyThemeSpider(scrapy.Spider):
name = 'bshopifyspider'
start_urls = ['https://themes.shopify.com/themes?page=1']
@admariner
admariner / journal_list.py
Created July 14, 2020 21:35 — forked from shamrt/journal_list.py
Scripts for Python Programs to Start Digging Into JSTOR’s Early Journals
# PROGRAM NAME: journal_list.py
# Displays the title of every journal in the JSTOR Early Journal Content Data Bundle.
# Highlights those with "Psych" or "Philos" in the title (+ two general science journals).
# Displays the filename of the first article for each journal.
# Written by Christopher D Green
# January 2014
# Modified by (if you modify this program, put your name here.)
@admariner
admariner / keyworksFromUrl.js
Created July 25, 2020 20:58 — forked from johnmurch/keywordsFromUrl.js
Parse keywords from URL
let url = "https://www.amazon.com/SanDisk-128GB-microSDXC-Memory-Adapter/dp/B073JYC4XM/";
let kwparse = (url.replace('https://','').replace('http://','').replace('www','').replace('com','').split('-').join().split('/').join().split('.')).join(',').replace(/^,/, '')
let kwuniq = [...new Set(kwparse.split(','))].filter(function(e){return e});
console.log(kwuniq)
@admariner
admariner / restaurant_bot.py
Created August 13, 2020 06:42 — forked from Robin-Lord/restaurant_bot.py
Short code which works with Twilio to record
"""
ADD THE FOLLOWING LINES TO YOUR REQUIREMENTS.TXT:
flask
twilio
pytz
"""