Metadata in PDF files can be stored in at least two places:
- the Info Dictionary, a limited set of key/value pairs
- XMP packets, which contain RDF statements expressed as XML
| #!/usr/bin/env python | |
| """ | |
| Very simple HTTP server in python (Updated for Python 3.7) | |
| Usage: | |
| ./dummy-web-server.py -h | |
| ./dummy-web-server.py -l localhost -p 8000 | |
| Send a GET request: |
| PayPal blocks copy/paste actions in their "change password" form, | |
| citing some irrelevant security issues as the reason. That's a | |
| load of crap, and they know it -- disabling copy/paste makes it a | |
| lot harder to use a decent password generator and a lot easier to | |
| screw up your pwd when retyping, especially if it's a long one | |
| (as it should be!). | |
| So, here's the quick'n'dirty way to use an externally generated | |
| password in your PayPal account: |
| #!/usr/bin/env python | |
| #-*- coding:utf8 -*- | |
| # paramiko の ProxyCommandの Sample | |
| # ------------------------------------------------- | |
| # | |
| # ~/.ssh/config | |
| # | |
| # Host proxy-server | |
| # User hoge |
| #!/bin/sh | |
| # | |
| # Setup a work space called `work` with two windows | |
| # first window has 3 panes. | |
| # The first pane set at 65%, split horizontally, set to api root and running vim | |
| # pane 2 is split at 25% and running redis-server | |
| # pane 3 is set to api root and bash prompt. | |
| # note: `api` aliased to `cd ~/path/to/work` | |
| # | |
| session="work" |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
| ;; -*- mode: emacs-lisp -*- | |
| ;; This file is loaded by Spacemacs at startup. | |
| ;; It must be stored in your home directory. | |
| (defun dotspacemacs/layers () | |
| "Configuration Layers declaration." | |
| (setq-default | |
| ;; List of additional paths where to look for configuration layers. | |
| ;; Paths must have a trailing slash (i.e. `~/.mycontribs/') | |
| dotspacemacs-configuration-layer-path '() |
| #!/bin/bash | |
| # Heith Seewald 2012 | |
| # Garoe Dorta 2015 | |
| # Luca Weiss 2015 | |
| # Also based on https://gist.github.com/MichaelLawton/ee27bf4a0f591bed19ac | |
| # Feel free to extend/modify to meet your needs. | |
| #### Lets run a few checks to make sure things work as expected. | |
| #Make sure we’re running with root permissions. | |
| if [ `whoami` != root ]; then |
| #include<stdio.h> | |
| #include<stdlib.h> | |
| #include<time.h> | |
| #define TEST_NUMBER 100 | |
| typedef struct node{ | |
| struct node * l, * r; | |
| int value; | |
| } node; |
Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.
There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.
struct foo {
struct bar {
int x;