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
/** | |
* Copyright(c) 2011 | |
* | |
* Licensed under the terms of the Open Source LGPL 3.0 | |
* http://www.gnu.org/licenses/lgpl.html | |
* @author Greivin Britton, brittongr@gmail.com | |
* | |
* @changes | |
* No currency symbol by default | |
* No decimalPrecision in config |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Transloadit</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script type="text/javascript" src="http://assets.transloadit.com/js/jquery.transloadit2.js"></script> | |
<script type="text/javascript"> | |
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
zend_extension=/usr/local/php5/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so | |
[xdebug] | |
xdebug.remote_enable=on | |
xdebug.default_enable=on | |
xdebug.remote_autostart=off | |
xdebug.remote_port=9000 | |
xdebug.remote_host=localhost | |
;xdebug.profiler_enable_trigger=1 | |
;xdebug.profiler_output_name=xdebug-profile-cachegrind.out-%H-%R | |
xdebug.var_display_max_children = 128 |
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
myApp.directive("jplayer", ['$window', 'PlayerService', function ($window, PlayerService) { | |
return { | |
restrict: "E", | |
// Have our own scope - we only want to watch the service and not conflict with other scopes | |
scope: {}, | |
// Serve up some html with our player | |
templateUrl: "/jplayer-template.html", | |
link: function (scope, element, attrs) { | |
// An element on the page to attach the jPlayer to. Could also use "element" from linkFN ^ | |
var jPlayer = angular.element("#jquery_jplayer_1").jPlayer(); |
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
interface=tap_soft | |
dhcp-range=tap_soft,192.168.100.50,192.168.100.60,24h | |
dhcp-option=tap_soft,3,192.168.100.1 | |
dhcp-option=tap_soft,option:dns-server,165.21.83.88,165.21.100.88 |
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
var titles = ''; | |
$('a[name="tdTitle"]').each(function(el){var text = $(this).html(); text = text + "\n"; titles = titles + (text.search('Part') > 0 ? (text.search('Part 1') > 0 ? text : '') : text).replace(' (Unabridged)', '').replace(' Part 1', '')}); |
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
define :generate_ssh_keys, :user_account => nil do | |
username = params[:user_account] | |
raise ":user_account should be provided." if username.nil? | |
Chef::Log.debug("generate ssh skys for #{username}.") | |
execute "generate ssh skys for #{username}." do | |
user username | |
creates "/home/#{username}/.ssh/id_rsa.pub" |
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
When I posted this on Apple’s Cocoadev listserver, I never did get pointers to code to convert a NSDictionary to a binary formatted plist, but did get pointers to look at NSPropertyListSerialization - something I had already (mis)read a few times. | |
The description for the dataFromPropertyList class method seems confusing if you don't understand that you can create a property list with no keys: that is, you can create one with a single compliant object, and the key becomes "root". | |
So, in the unlikely event that some else someday has the same mental block, here is actual tested code that takes a NSDictionary and creates a binary plist file: | |
NSDictionary *dict; | |
char *payload = "This is the payload"; | |
dict = [NSDictionary dictionaryWithObjectsAndKeys: |
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
$('form :input').each(function(index, elem) { | |
var eId = $(elem).attr('id'); | |
var label = null; | |
if (eId && (label = $(elem).parents('form').find('label[for='+eId+']')).length === 1) { | |
$(elem).attr('placeholder', $(label).html()); |
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
$("form :input").each(function(index, elem) { | |
var eId = $(elem).attr("id"); | |
var label = null; | |
if (eId && (label = $(elem).parents("form").find("label[for="+eId+"]")).length == 1) { | |
$(elem).attr("placeholder", $(label).html()); | |
$(label).remove(); | |
} | |
}); |
OlderNewer