Skip to content

Instantly share code, notes, and snippets.

View pcalves's full-sized avatar
🍵

Paulo Coelho Alves pcalves

🍵
View GitHub Profile
@pcalves
pcalves / obsidian-web-clipper.js
Last active March 27, 2024 08:53 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@pcalves
pcalves / obsidian-web-clipper.js
Created March 27, 2024 08:52 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@pcalves
pcalves / proof.md
Created March 21, 2024 16:33
keyoxide identity claim

aspe:keyoxide.org:4DUWGYYUDGLTC72ODGL5OA3KSU

Keybase proof

I hereby claim:

  • I am pcalves on github.
  • I am pcalves (https://keybase.io/pcalves) on keybase.
  • I have a public key whose fingerprint is B98C C334 4E0A 40F3 7B32 650C 5196 879F 567F 9302

To claim this, I am signing this object:

@pcalves
pcalves / grids.css
Created September 2, 2015 11:33
Simple grids. Infinite ❤️ & all credit to Chris Coyier. (https://css-tricks.com/dont-overthink-it-grids/)
.grid { width: auto; }
.grid:after {
content: "";
display: table;
clear: both;
}
[class*='col-'] {
float: left;
@pcalves
pcalves / cachebuster
Created March 11, 2015 15:25
Tells the server to ignore numbers in JavaScript and CSS file names (e.g. main.20150101.css), but the browser will still interpret it as a new file whenever the number is updated.
# cache-busting via file name
# Filename example:
# <link rel="stylesheet" href="/css/main.20150310.css">
# h/t Jeremy Keith (https://adactio.com/journal/8504)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.).(d).(js|css)$ $1.$3 [L]
@pcalves
pcalves / gulpfile.js
Created November 28, 2014 17:05
Basic gulpfile.js (no autoprefixer)
/**
* This gulpfile considers the following directory structure:
*
* .
* ├── app PHP framework stuff
* ├── bower_components Front-end libraries
* ├── node_modules Gulp & Gulp modules
* ├── public Production-ready assets
* │   ├── css
* │   ├── fonts
@pcalves
pcalves / fkCyi.markdown
Created October 22, 2014 16:36
A Pen by Paulo Coelho Alves.
@pcalves
pcalves / dabblet.css
Created March 28, 2014 17:21
Custom radio buttons & checkboxes with CSS
/**
* Custom radio buttons & checkboxes with CSS
* http://lea.verou.me/css3-secrets/#slide31
*/
/**
* These styles are for this dabblet only
*/
body {
color: #111;
@pcalves
pcalves / dabblet.css
Created March 27, 2014 17:45
CSS border experiments
/**
* CSS border experiments
*/
.bd {
display: inline-block;
border-top: 100px solid #e55;
border-left: 100px solid #e55;
border-right: 100px solid #e55;
border-bottom: 100px solid #e55;
width: 1px;