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
DECLARE | |
l_sql VARCHAR2(2000) := ''; | |
l_sql_tune_task_id VARCHAR2(400) ; | |
recommendations VARCHAR2(2000) ; | |
RetVal CLOB; | |
MAXBUFSIZE NUMBER := 32767; | |
BEGIN | |
dbms_output.enable(1000000) ; | |
l_sql_tune_task_id := dbms_sqltune.create_tuning_task( | |
sql_text => l_sql, |
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
/* Delete all unapproved comments */ | |
delete from comment where status = 0; |
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
# coding=UTF-8 | |
from __future__ import division | |
import re | |
# This is a naive text summarization algorithm | |
# Created by Shlomi Babluki | |
# April, 2013 | |
class SummaryTool(object): |
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
sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0 |
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
#!/bin/bash | |
# | |
# Author: Brian Beck <exogen@gmail.com> | |
# Usage: watch PATH COMMAND... | |
# | |
# This script watches PATH and runs COMMAND whenever PATH or a descendent | |
# of PATH is modified. COMMAND is everything after the first argument. | |
# | |
# If PATH is "-", then the list of paths comes from standard input. | |
# |
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
/* | |
Loads http://github.com/geuis/helium-css for testing without modifying the source pages | |
Crunched by http://ted.mielczarek.org/code/mozilla/bookmarklet.html to: | |
javascript:(function(){(function(msg,target){var loader=function(){if(arguments.callee._executed)return;arguments.callee._executed=true;if(typeof target==="function"){target();}else{jQuery.getScript(target);}var el=document.createElement('div');el.style.position='absolute';el.style.height='30px';el.style.width='200px';el.style.margin='0 auto 0 auto';el.style.top='0';el.style.left='40%';el.style.padding='5px 10px';el.style.backgroundColor='#F00';el.style.fontWeight="bold";el.style.textAlign="center";el.innerHTML=msg;document.body.appendChild(el);window.setTimeout(function(){jQuery(el).fadeOut('slow',function(){jQuery(this).remove();});},2500);};if(typeof jQuery!=='undefined'){loader();}else{var s=document.createElement('script');s.type="text/javascript";s.setAttribute('src',document.location.protocol+'//ajax.googleapis.com/ajax/libs |
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
.field-items { | |
position: absolute; | |
margin: auto; | |
top: 0; | |
left: 0; | |
right: 0; | |
bottom: 0; | |
width: 60%; | |
height: 60%; | |
.field-item { |
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
<?php | |
//... | |
foreach ($config->databases as $db => $cred) { | |
$this->di->set($db, function () use ($cred) { | |
$adaptor = "\\Phalcon\\Db\\Adapter\\Pdo\\{$cred->adapter}"; | |
return new $adaptor([ | |
'host' => $cred->host, | |
'username' => $cred->username, | |
'password' => $cred->password, | |
'dbname' => $cred->dbname |
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
<?php | |
//... | |
protected function _setEnvironment($config) | |
{ | |
$env = new \stdClass(); | |
if (array_key_exists('ENV', $_SERVER) && isset($_SERVER['ENV'])) { | |
$env->name = $_SERVER['ENV']; | |
} else { | |
$env->host = $_SERVER['HTTP_HOST']; | |
foreach ($config['domains'] as $k => $v) { |
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
// pre-render d3 charts at server side | |
var d3 = require('d3') | |
, jsdom = require('jsdom') | |
, fs = require('fs') | |
, htmlStub = '<html><head></head><body><div id="dataviz-container"></div><script src="js/d3.v3.min.js"></script></body></html>' | |
jsdom.env({ | |
features : { QuerySelector : true } | |
, html : htmlStub | |
, done : function(errors, window) { |
OlderNewer