Skip to content

Instantly share code, notes, and snippets.

View markasoftware's full-sized avatar
👽
secret alien technology

Mark Polyakov markasoftware

👽
secret alien technology
View GitHub Profile
@markasoftware
markasoftware / acm.bash
Last active May 29, 2020 12:32
ACM Scraper
#!/bin/bash
# This file is released under the GNU Public License v3
# ACM scraper during coronavirus
# Will skip existing PDFs to speed up a resumed download
# Get the link to the first issue in the journal/SIG/etc, then the scraper will use "next" links to traverse
# Usage: ./acm.bash first_issue_link output_dir
# Eg, ./acm.bash https://dl.acm.org/toc/siggraph/1969/3/3 /media/mass/siggraph to download all SIGGRAPH PDFs
# note: acm does BLOCK IPs after a few hundred PDFs! Uncommenting the sleep statement below to slow things down may help, but I haven't tested
@markasoftware
markasoftware / html.lisp
Last active June 16, 2024 02:08
html->string (Super simple HTML templating for Lisp)
;; Copyright (c) 2020 Mark Polyakov
;; Released under the WTFPL (Do What The Fuck You Want To Public License)
(defvar *html-void-tags* '(:area :base :br :col :embed :hr :img :input :link
:meta :param :source :track :wbr)
"String designators for self-closing/void tags.
https://html.spec.whatwg.org/multipage/syntax.html#void-elements")
(defvar *html-escapes*
'(#\> ">"
@markasoftware
markasoftware / enterprise_token.rb
Last active August 8, 2025 07:16
OpenProject Enterprise mode for free
############ If you are using DOCKER all-in-one image, create Dockerfile like: ################
############ FROM openproject/openproject:16 ################
############ COPY ./enterprise_token.rb app/models/enterprise_token.rb ################
############ If you are runing a manual installation: ################
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ If using some other set up (eg docker-compose), read the comments on ################
############ https://gist.github.com/markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 ################
@markasoftware
markasoftware / copy-table-to-clipboard.sh
Last active April 4, 2023 17:52
Copy CSV to clipboard as table, in shell
#!/bin/bash
# Use input redirection. Copies straight to clipboard.
# Can paste into spreadsheet applications directly.
# MIT licensed.
gawk '
BEGIN { FPAT = "([^,]*)|(\"[^\"]+\")" }
NR>1 { print "" }
{