Skip to content

Instantly share code, notes, and snippets.

View mihaiconstantin's full-sized avatar
📑
Thesis Writing

Mihai Constantin mihaiconstantin

📑
Thesis Writing
View GitHub Profile
@senderle
senderle / hand-modify-pdf.md
Created September 23, 2020 15:03
So you want to modify the text of a PDF by hand

So you want to modify the text of a PDF by hand...

If you, like me, resent every dollar spent on commercial PDF tools, you might want to know how to change the text content of a PDF without having to pay for Adobe Acrobat or another PDF tool. I didn't see an obvious open-source tool that lets you dig into PDF internals, but I did discover a few useful facts about how PDFs are structured that I think may prove useful to others (or myself) in the future. They are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.

@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active June 2, 2024 11:24
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active July 1, 2024 08:20
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shama
shama / electron-reliable-css-path.html
Created May 25, 2015 17:33
Alternate way to load CSS file to ensure it gets loaded with a correct path with Electron
<html>
<head>
<title></title>
</head>
<body>
Hi
<script>
var link = document.createElement('link')
link.setAttribute('rel', 'stylesheet')
link.setAttribute('href', require('path').join(__dirname, 'css', 'app.css'))
@gitaarik
gitaarik / git_submodules.md
Last active July 2, 2024 10:44
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@cferdinandi
cferdinandi / get-siblings.js
Last active August 29, 2021 15:56
A simple script to get all siblings of an element.
/**
* Get siblings of an element
* @param {Element} elem
* @return {Object}
*/
var getSiblings = function (elem) {
var siblings = [];
var sibling = elem.parentNode.firstChild;
var skipMe = elem;
for ( ; sibling; sibling = sibling.nextSibling )
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 2, 2024 13:33
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname