View mootools.cloneEventsDeep.js
Native.implement([Element, Window, Document], { | |
cloneEventsDeep: function(from, type){ | |
if (this.getChildren().length > 0) { | |
this.getChildren().each(function(item, index) { | |
item.cloneEventsDeep(from.getChildren()[index], type); | |
}); | |
this.cloneEvents(from, type); | |
} else { | |
this.cloneEvents(from, type); | |
} |
View mootools.isNumeric.js
String.implement({ | |
isNumeric: function() { | |
var r = true; | |
this.split('').each(function(i) { | |
if ('0123456789.,'.indexOf(i) == -1) { | |
r = false; | |
} | |
}); | |
return r; | |
} |
View Imap.php
<?php | |
/** | |
* Stachl | |
* | |
* LICENSE | |
* | |
* This source file is subject to the CC-GNU GPL license that is bundled | |
* with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://creativecommons.org/licenses/GPL/2.0/ |
View Config.php
<?php | |
/** | |
* Stachl | |
* | |
* LICENSE | |
* | |
* This source file is subject to the CC-GNU GPL license that is bundled | |
* with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://creativecommons.org/licenses/GPL/2.0/ |
View Ping.php
<?php | |
/** | |
* Stachl | |
* | |
* LICENSE | |
* | |
* This source file is subject to the CC-GNU GPL license that is bundled | |
* with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://creativecommons.org/licenses/GPL/2.0/ |
View replace.py
""" | |
Search and replace a string in a file as a python one-liner | |
@author Thomas Stachl | |
@created Mar 12, 2011 | |
@license Attribution 3.0 Unported (CC BY 3.0) | |
This work is licensed under the Creative Commons Attribution 3.0 | |
Unported License. To view a copy of this license, visit | |
http://creativecommons.org/licenses/by/3.0/ or send a letter to |
View InheritConfigParser.py
""" | |
Stachl | |
LICENSE | |
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, copy, modify, merge, publish, distribute, sublicense, and/or sell |
View ProxyRb.rb
# Copyright (c) 2012, Thomas Stachl <thomas@stachl.me> | |
# | |
# 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, copy, modify, merge, publish, distribute, | |
# sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all copies or | |
# substantial portions of the Software. |
View gist:2760221
// if you want to use it inside a visualforce page create a function around it | |
function showFollowUp() { | |
// if you want to use it in a button make sure you require jQuery | |
// {!REQUIRESCRIPT("https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js")} // UNCOMMENT IF IN A BUTTON | |
// get the dialog with your dialog name | |
var d = sfdcPage.dialogs['MyCoolDialog'], close; | |
if (!d) { | |
// if the dialog doesn't exist create one | |
d = sfdcPage.dialogs['MyCoolDialog'] = new SimpleDialog('MyCoolDialog', false); | |
// set general information on your dialog and finally run the create function |
View gist:2888905
<div class="agent_customer_gravatar"> | |
<span class="a-user-icon"> | |
{{thumb}} {{social_profile}} | |
</span> | |
</div> | |
<div class="agent_customer_section short" > | |
{{first_name}} | |
</div> |
OlderNewer