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
CREATE OR REPLACE FUNCTION order_numbers_first(string character varying) | |
RETURNS character varying AS | |
$BODY$ | |
DECLARE new_string character varying; | |
c character varying; | |
i integer; | |
BEGIN | |
i := 0; | |
new_string := ''; |
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 | |
/** | |
* @method string metoda($param) Komentar | |
*/ | |
class A { } | |
namespace NS; | |
/** |
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
// /usr/local/src/httpd-2.3.16-beta/support/ab -r -n 10000 -c 10 http://127.0.0.1:1327/ | |
var http = require('http'); | |
var sys = require('util') | |
var exec = require('child_process').exec; | |
var util = require('util'); | |
var cnt = 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
data = networks: [ | |
type: "facebook" | |
message: "Dlouha zprava pro fejskuuuuuk" | |
profiles: [ | |
id: "2431233" | |
name: "Moje pejdz" | |
selected: true | |
, | |
id: "242342343" | |
name: "Jina pejdz" |
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
formatTweet: (tweet) -> | |
chars = [] | |
text = tweet.text | |
chars.push c for c in tweet.text | |
chars = @processEntity chars, tweet.entities.hashtags, (entity) -> | |
'<a href="#">#' + entity.text + '</a>' | |
chars = @processEntity chars, tweet.entities.user_mentions, (entity) -> | |
'<a href="#">@' + entity.screen_name + '</a>' | |
chars = @processEntity chars, tweet.entities.urls, (entity) -> |
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
protected function underScoreToCamelCase( $string ) { | |
return preg_replace( '/(?:^|_)(.?)/e', "strtoupper('$1')", $string ); | |
} | |
protected function underScoreToPamelCase( $string ) { | |
return preg_replace( '/_(.?)/e', "strtoupper('$1')", $string ); | |
} | |
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
TokenPool = require '../index' | |
tp = new TokenPool | |
describe "Sample test", -> | |
it "melo by to delat to a to", -> | |
tp.get (data)-> | |
expect(data).toEqual 'data z poolu' | |
it "to by melo spadnout", -> | |
tp.get (data)-> |
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
mp = require 'msgpack3' | |
string = '{"_index":"posts-2012-29","_type":"post","_id":"438861426136421_439222532766977","_version":7,"exists":true, "_source" : {"id":"438861426136421_439222532766977","message":"z fejsu","picture":"http:\/\/photos-e.ak.fbcdn.net\/hphotos-ak-ash3\/524088_439222509433646_1975878462_s.jpg","link":"http:\/\/www.facebook.com\/photo.php?fbid=439222509433646&set=a.439222506100313.96281.438861426136421&type=1&relevant_count=1","icon":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v2\/yz\/r\/StEh3RhPvjk.gif","actions":[{"name":"Comment","link":"http:\/\/www.facebook.com\/438861426136421\/posts\/439222532766977"},{"name":"Like","link":"http:\/\/www.facebook.com\/438861426136421\/posts\/439222532766977"}],"privacy":{"description":"Public","value":"EVERYONE"},"type":"photo","object_id":"439222509433646","created_time":"2012-07-18T15:56:31+00:00","updated_time":"2012-07-18T16:02:18+00:00","comments":{"438861426136421_439222532766977_1139378":1342627338},"like_count":0,"comment_count":1,"first_admin_ |
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
server = net.createServer (socket) -> | |
term = pty.spawn 'bash', [], { | |
name: 'xterm-color', | |
cols: 80, | |
rows: 30, | |
cwd: process.env.HOME, | |
env: process.env | |
} | |
term.on 'data', (data) -> |
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
http = require 'http' | |
util = require 'util' | |
net = require 'net' | |
command = process.argv.splice 2 | |
options = | |
host: '10.1.69.105' | |
port: 80 | |
path: '/' |
OlderNewer