This file contains hidden or 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 Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>beforeRunningCommand</key> | |
<string>nop</string> | |
<key>bundleUUID</key> | |
<string>4675F24E-6227-11D9-BFB1-000D93589AF6</string> | |
<key>command</key> | |
<string>#!/usr/bin/env ruby -wKU |
This file contains hidden or 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 | |
/** | |
* Retrieve list of images from a post. | |
* | |
* The defaults are as follows: | |
* 'number' - Default is -1. Total number of images to retrieve. | |
* 'order' - Default is 'ASC'. The order to retrieve the attachments. | |
* 'orderby' - Default is 'post_date'. How to order the posts. | |
* Uses 'natural' to retrieve the images in the order they appear in the post. | |
* 'output' - Default is OBJECT. Constant for return type, either OBJECT, ARRAY_A, ARRAY_N. |
This file contains hidden or 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
--- class.phpmailer.php | |
+++ (clipboard) | |
@@ -323,9 +323,7 @@ | |
* @return void | |
*/ | |
public function AddAddress($address, $name = '') { | |
- $cur = count($this->to); | |
- $this->to[$cur][0] = trim($address); | |
- $this->to[$cur][1] = $name; | |
+ $this->to[] = array(trim($address), $name); |
This file contains hidden or 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
Singular | |
issue 2 | |
issue 11 | |
bug 2 | |
ticket 2 | |
#2 | |
issue #2 | |
foo #2 |
This file contains hidden or 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 ENV['TM_SUPPORT_PATH'] + "/lib/exit_codes" | |
# Converts a HTML color string to a RGB colors string. | |
# | |
# hex_to_css("#6633ff") # => rgb(102, 51, 255) | |
# hex_to_css("#63f") # => rgb(102, 51, 255) | |
# hex_to_css("#6633ff80") # => rgba(102, 51, 255, .50) | |
# hex_to_css("#63FA") # => rgba(102, 51, 255, .67) |
This file contains hidden or 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 | |
/** | |
* Reverse a CamelCase string. | |
* | |
* Examples: | |
* uncamel('lowerCamelCase') === 'lower_camel_case' | |
* uncamel('UpperCamelCase') === 'upper_camel_case' | |
* uncamel('ThisIsAString') === 'this_is_a_string' | |
* uncamel('notcamelcase') === 'notcamelcase' | |
* uncamel('lowerCamelCase', ' | ') === 'lower | camel | case' |
This file contains hidden or 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 bash | |
# string_to_int.sh - Shell script to convert a string or float number | |
# to an integer. | |
# @link http://pioupioum.fr/snippets/bash-convertir-string-to-integer.html | |
function string_to_int () | |
{ | |
LANG=C | |
d=${1##*.} | |
if [[ ${#1} -eq ${#d} ]]; then |
This file contains hidden or 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
# Redirect all files are not in /foo/bar/blog to http//example.com/ | |
RewriteEngine On | |
RewriteBase /foo/bar/ | |
RewriteCond %{REQUEST_URI} !blog/?.* | |
RewriteRule ^(.*)$ http://example.com/ [R=301,L] |
This file contains hidden or 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 | |
# | |
# Convert a hex color into an RGB(A) color. | |
# | |
# Copyright (C) 2010 Mehdi Kabab <http://pioupioum.fr/> | |
# | |
# Permission is hereby granted, free of charge, to any person | |
# obtaining a copy of this software and associated documentation | |
# files (the "Software"), to deal in the Software without | |
# restriction, including without limitation the rights to use, |
This file contains hidden or 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
defaults read "/Library/Frameworks/Adobe AIR.framework/Versions/Current/Resources/Info" CFBundleVersion | |
OU | |
plutil -convert xml1 -o - "/Library/Frameworks/Adobe AIR.framework/Versions/Current/Resources/Info.plist" | grep -A 1 CFBundleVersion |
OlderNewer