Skip to content

Instantly share code, notes, and snippets.

@arieljatib
arieljatib / scribd_export.js
Created April 27, 2021 18:37
Exporting notes and highlights from Scribd
// based on code from https://medium.com/@art.stories/scribd-export-notes-workaround-13af221879d6
var annotations = document.querySelector('.annotations');
var notesParagraphs = Array.from(annotations.querySelectorAll('p, span.page_num, strong.annotation_type'));
notesParagraphs.reverse();
var notesText = notesParagraphs.map((paragraph) => `<p>${paragraph.innerHTML}</p>`).join('');
var win = window.open("", "Title", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=200,top="+(screen.height-400)+",left="+(screen.width-840));
win.document.body.innerHTML = `<div>${notesText}</div>`
// export attendee list is broken
// scrape meetup.com/group-name/events/[id]/attendees for names.
// run from `console` in web inspector
// make sure pop-up window is allowed / enabled
var annotations = document.querySelector('.attendees-list');
var notesParagraphs = Array.from(annotations.querySelectorAll('._memberItem-module_name__BSx8i, .text--bold text--ellipsisOneLine'));
var notesText = notesParagraphs.map((paragraph) => `${paragraph.innerHTML}`).join('');
var win = window.open("", "Title", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=600.text--bold text--ellipsisOneLine00,top="+(screen.height-400)+",left="+(screen.width-840));
win.document.body.innerHTML = `<div>${notesText}</div>`
// scrape sched page to list name, company and position for speakers.
// based on code from https://medium.com/@art.stories/scribd-export-notes-workaround-13af221879d6
// and scribd_export.js
var annotations = document.querySelector('.sched-container-people');
var notesParagraphs = Array.from(annotations.querySelectorAll('h2, div.sched-event-details-company, div.sched-event-details-position'));
var notesText = notesParagraphs.map((paragraph) => `<p>${paragraph.innerHTML}</p>`).join('');
var win = window.open("", "Title", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=200,top="+(screen.height-400)+",left="+(screen.width-840));
win.document.body.innerHTML = `<div>${notesText}</div>`
@arieljatib
arieljatib / spc-marketing.md
Last active March 28, 2020 17:16
StackPointCloud and Stackpoint.io Marketing Blurbs

Original, pre-K8s

Bridging on-premise hosting to the Cloud. Secure. Redundant. Scalable.

Second Iteration, Hello Kubernetes!

A new way to manage your Kubernetes, CoreOS stack.

Public

Kubernetes Anywhere - Any Cloud. Any Distribution.

@arieljatib
arieljatib / ASS.md
Created January 7, 2020 18:11 — forked from klaaspieter/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

@arieljatib
arieljatib / seo-info.md
Last active October 3, 2017 19:56
SEO Info
@arieljatib
arieljatib / cli-color.md
Last active July 6, 2016 21:26
Color Formatting

#Colorizing Terminal These codes are useful when formatting the command line on Terminal in MacOS.

Foreground Colors

Code Color
30 black
31 red
32 green
33 yellow
@arieljatib
arieljatib / goto-git.md
Last active February 2, 2016 21:20
Go To Git

Basics

  • $ git push origin branch to push local changes to remote branch

Checkout Remote Branch

  • $ git checkout -b branch-name origin/branch-name

Merge from another branch

  1. $ git pull
  2. Merge, from a local branch $ git merge other-branch
  3. OR from a remote branch $ git merge origin/other-branch
@arieljatib
arieljatib / return.js
Last active October 10, 2015 17:46
JavaScript : The Return
// You can set a variable to a function like this:
function myFunc(){
var foo= 500;
// foo is declared inside the function so it cannot be accessed outside of the function.
return foo;
}
var a = myFunc();
@arieljatib
arieljatib / fromBottom.js
Last active October 10, 2015 13:24
Set Distance From Bottom, Stop Fixed Position
// Adjust location of 'back to top' near the bottom of the page
function notTooNearTheBottom() {
var viewportHeight = $(window).height();
var actionsArea = $(window).scrollTop() + viewportHeight;
var bottomBoundary = $(document).height() - 90; // this is our 'safe area'
if( actionsArea > bottomBoundary ) {
// console.log('near the bottom - move 'up to top', hide 'comments');
$('#action-top').css('top', bottomBoundary);
}