most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2357277/hack.sh | sh | |
# |
location /resize { | |
alias /tmp/nginx/resize; | |
set $width 150; | |
set $height 100; | |
set $dimens ""; | |
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) { | |
set $width $1; | |
set $height $2; | |
set $image_path $3; |
// This example shows how to render pages that perform AJAX calls | |
// upon page load. | |
// | |
// Instead of waiting a fixed amount of time before doing the render, | |
// we are keeping track of every resource that is loaded. | |
// | |
// Once all resources are loaded, we wait a small amount of time | |
// (resourceWait) in case these resources load other resources. | |
// | |
// The page is rendered after a maximum amount of time (maxRenderTime) |
/** | |
* WkHtmlToPdf table splitting hack. | |
* | |
* Script to automatically split multiple-pages-spanning HTML tables for PDF | |
* generation using webkit. | |
* | |
* To use, you must adjust pdfPage object's contents to reflect your PDF's | |
* page format. | |
* The tables you want to be automatically splitted when the page ends must | |
* have a class name of "splitForPrint" (can be changed). |
EC2 only lets you export instances as VMWare-compatible OVA files if you originally imported that instance from an OVA. Presumably it preserves the metadata and XML gubbins for the instance, and just wraps it up again using that metadata on export.
In order to provision arbitrary VMs in an OVA-exportable way, we abuse the volume snapshots on one VM.
ec2-instance-import
onto an HVM instance type (ie, no xen kernel needed)<?php | |
include "utils.php"; | |
$fp = parse_fp($_GET['fp']); | |
$dbh = new PDO('mysql:host=localhost;dbname=fingerprint', 'fingerprint'); | |
$dbh->beginTransaction(); | |
$sth = $dbh->prepare("INSERT INTO fp (length) VALUES (?)"); |
Ремарка: все тесты были на Ubuntu Server 14.04, так же все это справедливо для версии openssl >= 1.0.0. Не советую использовать эту сборку curl для всего что угодно, так как она может быть сильно хуже по возможностям стандартной, так как я компилировал утилиту всего с 1 флагом, и соответственно мог упустить уйму важных ее возможностей. Советую использовать ее как доп утилиту в папке проекта или где попало, не советую в продакшен использовать везде где попало, ну или если с головой подходить к флагам компиляции и сделать это хорошо и по настоящему, у меня такой цели не стоит, делаю на скорую руку, просто как рабочее решение.
Устанавливаем openssl
apt-get install -y openssl
Настраиваем в linux curl программе (не путать с библиотеками языков типа php_curl.so, там уже сами, но принцип тот же) поддержку криптографических движков:
GOST2001-GOST89-GOST89 >