Skip to content

Instantly share code, notes, and snippets.

View brailateo's full-sized avatar

Constantin Teodorescu brailateo

View GitHub Profile

Keybase proof

I hereby claim:

  • I am brailateo on github.
  • I am brailateo (https://keybase.io/brailateo) on keybase.
  • I have a public key ASAsMiCQY63MROIsF-zwpe0S5QRKeeX9I6Hk4q1gCI3H0wo

To claim this, I am signing this object:

@brailateo
brailateo / gist:03646f1f0633b5772f00
Created January 12, 2016 17:18
Ceva verificare
Verifying that +brailateo is my blockchain ID. https://onename.com/brailateo
@brailateo
brailateo / new_gist_file.erl
Created January 22, 2014 18:18
LIST function for CouchDB - extracting information from a view (or from _all_docs) in order to be returned as a JSON data well formed, suitable for an aaData data source for a DataTable in browser
fun(Head, {Req}) ->
Send(<<"[">>),
Fun = fun({Row}, Virgula) ->
Send(Virgula),
case proplists:get_value(<<"doc">>, Row) of
{Doc} ->
Elocalitate = proplists:is_defined(<<"Siruta">>, Doc),
if
Elocalitate ->
Send(<<"[\"">>),
@brailateo
brailateo / addRuntimeCSS
Created July 17, 2013 09:44
Asta produce adăugarea la runtime a noi reguli de CSS
$("<style>")
.prop("type", "text/css")
.html("\
#my-window {\
position: fixed;\
z-index: 102;\
display:none;\
top:50%;\
left:50%;\
}")
@brailateo
brailateo / SerialNumberGenerator
Last active October 26, 2017 06:12
Generator automat de numere seriale în Go
func jobIdGenerator(init int) chan int {
ids := make(chan int)
go func() {
id := init //intializare cu ultimul nr din baza de date
for {
id++
ids <- id
}
}()
return ids
@brailateo
brailateo / new_gist_file
Created July 16, 2013 22:10
jQuery: Bind pe un buton pentru lansarea o singură dată a unei proceduri ("Salvare document", "Abandon")
$('#btnSalvare').one("click", function() {
// chestii ... salvare, etc
// va fi apelat o singură dată, dublu-click nu merge
...
});