Skip to content

Instantly share code, notes, and snippets.

View karamanolev's full-sized avatar

Ivailo Karamanolev karamanolev

View GitHub Profile
checking whether make supports nested variables... yes
Building libtorrent-rasterbar 1.1.12
Checking for a C/C++ compiler to use:
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
{
"private": true,
"devDependencies": {
"babel-cli": "~6.24.1",
"babel-loader": "~7.0.0",
"babel-preset-es2015": "~6.24.1",
"babel-preset-react": "~6.24.1",
"babel-preset-stage-2": "~6.24.1",
"babel-runtime": "~6.23.0",
"bower": "~1.8.0",
This file has been truncated, but you can view the full file.
0 info it worked if it ends with ok
1 verbose cli [ '/Users/ivailo/.nvm/versions/node/v7.10.0/bin/node',
1 verbose cli '/Users/ivailo/.nvm/versions/node/v7.10.0/bin/npm',
1 verbose cli 'install' ]
2 info using npm@4.6.1
3 info using node@v7.10.0
4 silly install loadCurrentTree
5 silly install readLocalPackageData
6 silly install normalizeTree
7 silly install loadIdealTree
@karamanolev
karamanolev / decorators.py
Created September 15, 2016 07:30
EncryptedIdMixin
def encrypted_id_view(model_class, parameter_name):
"""Wraps a view, decoding a kwargs with parameter_name using the model_class id encryption."""
def wrapped_decorator(f):
@wraps(f)
def wrapped_f(*args, **kwargs):
# Normally the regex in the url returns a string, but decode will give us an int
kwargs[parameter_name] = str(
model_class._get_id_cipher().decrypt(kwargs[parameter_name]))
return f(*args, **kwargs)
@karamanolev
karamanolev / Example using 1.8.12
Created August 2, 2016 15:17
Problematic rendering using PDFBox using 2.0.2 (works with 1.8.12)
public class Main {
public static void main(String[] args) throws Exception {
PDDocument doc = PDDocument.loadNonSeq(new File("test.pdf"), null);
doc.setAllSecurityToBeRemoved(true);
PDDocumentCatalog cat = doc.getDocumentCatalog();
PDAcroForm form = cat.getAcroForm();
for (Object _field : form.getFields()) {
PDField field = (PDField) _field;
System.out.println(field.getFullyQualifiedName());
field.setValue(field.getFullyQualifiedName());