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
$('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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
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
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()); | |
$(label).remove(); | |
} | |
}); |
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
/** | |
* 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
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" |
NewerOlder