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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d -p 8082:80 --mount type=bind,source="$(pwd)",target=/var/www/html php:apache | |
// That's it! If you try this, and it works for you, you're done! | |
// The command does the following: | |
// If the Docker image php:apache is not present in your machine's local Docker registry, it will be downloaded from Docker hub. | |
// It creates a new container based on the image php:apache. | |
// It maps port 80 from the container to port 8082 on your host machine. | |
// It mounts the current directory from your host machine to /var/www/html in the container. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import bpy | |
output = None | |
input = None | |
info = None | |
error = None | |
write = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To install as a global sbt plugin, place this file in: | |
// ~/.sbt/1.0/plugins/Semanticdb.scala | |
// ~/.sbt/0.13/plugins/Semanticdb.scala | |
// To use it, run `sbt semanticdb`. This will first enable the semanticdb | |
// compiler plugin for modules that have a compatible scala version and then | |
// trigger compilation for those projects. | |
import sbt._ | |
import sbt.Keys._ | |
import sbt.plugins.JvmPlugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update && \ | |
sudo apt install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ | |
sudo apt update && \ | |
sudo apt install gcc-6 g++-6 -y && \ | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 && \ | |
gcc -v |
GSoC 2017 final report
Organisation: PMD
Mentor: Andreas Dangel andreas.dangel@adangel.org
Student: Clément Fournier clement.fournier76@gmail.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using JetBrains.Annotations; | |
namespace Helpers | |
{ | |
public static class ArgumentValidation | |
{ | |
public static void ThrowIfNull<T>([ValidatedNotNull] [NoEnumeration] T argument) | |
where T : class | |
{ |
Snake is a fun game to make as it doesn't require a lot of code (less than 100 lines with all comments removed). This is a basic implementation of the snake game, but it's missing a few things intentionally and they're left as further exploration for the reader.
- Score
- When the snake eats an apple, the score should increase by one. Use context.fillText() to display the score to the screen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Tests distance between point and triangle in 3D. Aligns and uses 2D technique. | |
# | |
# Was originally some code on mathworks | |
import numpy | |
from numpy import dot | |
from math import sqrt |
NewerOlder