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
#!/bin/bash | |
# | |
# mkv2m4v inputfile.mkv | |
# | |
# Given an MKV container with H.264 video & AC3 or DTS audio, converts | |
# quickly to an iPad-compatible MP4 container without re-encoding the | |
# video (so it must already be in an iPad-compatible resolution); the | |
# audio is downmixed to stereo with Dynamic Range Compression. | |
# | |
ME=$(basename $0) |
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
<?php | |
// secure hashing of passwords using bcrypt, needs PHP 5.3+ | |
// see http://codahale.com/how-to-safely-store-a-password/ | |
// salt for bcrypt needs to be 22 base64 characters (but just [./0-9A-Za-z]), see http://php.net/crypt | |
$salt = substr(strtr(base64_encode(openssl_random_pseudo_bytes(22)), '+', '.'), 0, 22); | |
// 2y is the bcrypt algorithm selector, see http://php.net/crypt | |
// 12 is the workload factor (around 300ms on my Core i7 machine), see http://php.net/crypt |
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
Index: samples/app/modules/Default/actions/Widgets/MenuAction.class.php | |
=================================================================== | |
--- samples/app/modules/Default/actions/Widgets/MenuAction.class.php (revision 4758) | |
+++ samples/app/modules/Default/actions/Widgets/MenuAction.class.php (working copy) | |
@@ -71,6 +71,11 @@ | |
return 'Success'; | |
} | |
+ public function generateEsiUrl(AgaviRouting $ro, AgaviRequestDataHolder $rd = null) | |
+ { |
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/osascript | |
on run | |
if not (application "Mail" is running and application "The Hit List" is running) then | |
return | |
end if | |
tell application "Mail" | |
repeat with _account in imap accounts | |
set _inbox to _account's mailbox "INBOX" | |
set _messages to (a reference to (every message of _inbox whose flagged status is true)) | |
-- We must use this workaround, because the reference will self-update once we unflag a message, and that will get us just one of two flagged messages imported |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>BackgroundBlur</key> | |
<real>0.0</real> | |
<key>BackgroundColor</key> | |
<data> | |
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS | |
AAGGoKMHCA9VJG51bGzTCQoLDA0OViRjbGFzc1xOU0NvbG9yU3BhY2VXTlNXaGl0ZYAC |
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
# First add a rule for all local traffic to port 80 to go into pipe 1 | |
# 100 is the rule number which will be used for referencing the rule later | |
sudo ipfw add 100 pipe 1 ip from 127.0.0.1 to 127.0.0.1 dst-port http | |
# To display the rule use | |
# sudo ipfw show 100 | |
# configure the settings of the pipe as you please | |
# 50kbit/s bandwidth | |
sudo ipfw pipe 1 config bw 50Kbit | |
# 200ms lag |
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
diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php | |
index fac7132..7b62242 100644 | |
--- a/src/Composer/Installer.php | |
+++ b/src/Composer/Installer.php | |
@@ -647,7 +647,7 @@ class Installer | |
private function createPolicy() | |
{ | |
- return new DefaultPolicy($this->package->getPreferStable()); | |
+ return new DefaultPolicy((!$this->update && $this->locker->isLocked()) ? $this->locker->getPreferStable() : $this->package->getPreferStable()); |
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 ruby | |
require 'uri' | |
ARGF.each_line do |line| | |
key, value = line.split(':', 2) | |
if !value | |
$stdout.puts key | |
next |
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
$ composer install --no-interaction | |
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug | |
> ExpressiveInstaller\OptionalPackages::install | |
Setup data and cache dir | |
Setting up optional packages | |
- Adding package zendframework/zend-expressive-fastroute (^1.0) | |
- Copying /config/autoload/routes.global.php | |
- Adding package zendframework/zend-servicemanager (^2.7.3 || ^3.0) | |
- Adding package ocramius/proxy-manager (^1.0) | |
- Copying /config/container.php |
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
git clone https://github.com/symfony-cmf/cmf-sandbox.git | |
cd cmf-sandbox | |
composer install | |
# declare optional extensions as required | |
php -dmemory_limit=4G $(which composer) require "ext-gd:*" "ext-exif:*" | |
git add composer.json composer.lock | |
git commit -m "require gd and exif extensions" | |
# add DATABASE_URL mapping to composer.json and update DB config (see database.diff) | |
php -dmemory_limit=4G $(which composer) update --lock | |
git add composer.json composer.lock app/config/config.yml app/config/config_prod.yml |
OlderNewer