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
var SnippetView = new KONtx.Class({ | |
ClassName: 'SnippetView', | |
Extends: KONtx.system.AnchorSnippetView, | |
createView: function() { | |
this.controls.text = new KONtx.element.Text({ | |
label: $_('Snippet.Text'), | |
styles: { |
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
var D=new function(){var t=this,f='ShockwaveFlash',s=f+'.'+f,w=function(o){try{t.v=o.GetVariable("$version")}catch(e){}},r=[[s+'.7',w],[s+'.6',function(o){t.v='6,0,21' | |
try{o.AllowScriptAccess='always';w(o)}catch(e){}}],[s,w]],n=navigator,p=n.plugins,e='enabledPlugin',d='description',i=0 | |
t.i=0;t.v=-1 | |
t.D=function(){if(p&&p.length>0){var a='application/x-shockwave-flash',m=n.mimeTypes | |
if(m&&m[a]&&m[a][e]&&m[a][e][d]){t.v=m[a][e][d];t.i=1}}else | |
if(n.appVersion.indexOf('Mac')==-1&&window.execScript){for(;i<r.length&&t.v==-1;i++){try{r[i][1](new ActiveXObject(r[i][0]));t.i=1}catch(e){}}}}()}; |
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
def collatz(order) | |
loops = 0 | |
i = rand(10**order) | |
while i > 1 | |
if i % 2 == 0 | |
i = i / 2 | |
else | |
i = i * 3 + 1 | |
end | |
loops+=1 |
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 KONtx.FOO | |
* @description | |
This is a description of class FOO. | |
Isn't it such a grand description. | |
FML! | |
* @end | |
* @example | |
var foo = new KONtx.FOO(); | |
foo.bar(); |
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 | |
abstract class write_once_class | |
{ | |
function __get($key) { | |
if(property_exists(get_class($this), $key)) { | |
return $this->$key; | |
} else { | |
throw new Exception("Can't get a variable which isn't declared."); | |
} |
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
http://msdn.microsoft.com/en-us/library/dd633667.aspx | |
http://msdn.microsoft.com/en-us/library/exchangewebservices.calendaritemupdateoperationtype.aspx |
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 | |
class base58 | |
{ | |
static public $alphabet = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"; | |
public static function encode($int) { | |
$base58_string = ""; | |
$base = strlen(self::$alphabet); | |
while($int >= $base) { |
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
#!/bin/bash | |
while true; do | |
result=`curl -Is http://developer.apple.com/iphone/ | grep Location | grep comebacksoon`; | |
if [ x = "x$result" ]; then | |
echo "Yeah!"; | |
exit; | |
fi; | |
sleep 30; | |
done; |
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
# useful general .bash_profile tweaks for color loving VI fans | |
export TERM=xterm-color | |
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;36' | |
export CLICOLOR=1 | |
alias ls='ls -G' | |
export LS_COLORS='di=1:fi=0:ln=31:pi=5:so=5:bd=5:cd=5:or=31:mi=0:ex=35:*.rb=90' | |
export COLOR_NC='\e[0m' # No Color | |
export COLOR_WHITE='\e[1;37m' | |
export COLOR_BLACK='\e[0;30m' |
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
set -o vi | |
# Goto begin of line | |
bind -m vi-command C-a:vi-insert-beg | |
bind -m vi-insert C-a:vi-insert-beg | |
# Goto end of line | |
bind -m vi-command C-e:vi-append-eol | |
bind -m vi-insert C-e:vi-append-eol | |
NewerOlder