Skip to content

Instantly share code, notes, and snippets.

View buremba's full-sized avatar
🤖
at LiveRamp

Burak Emre Kabakcı buremba

🤖
at LiveRamp
  • LiveRamp
  • London
  • 03:36 (UTC)
  • X @bu7emba
View GitHub Profile
@yuanchuan
yuanchuan / gist:1330150
Created November 1, 2011 08:27
simple draggable using jquery
/**
* usage:
* $('div').draggable();
* $('*').draggable();
*/
$.fn.draggable = function() {
var $document = $(document)
, mouse = { update: function(e) {this.x = e.pageX; this.y = e.pageY;} };
@berkayunal
berkayunal / Kredi Kartı BIN Listesi - CSV
Created January 11, 2012 17:16
Kredi Kartı BIN Listesi
bin,banka_kodu,banka_adi,type,sub_type,virtual,prepaid
413226,10,T.C. ZİRAAT BANKASI A.Ş.,VISA,PLATINUM
444676,10,T.C. ZİRAAT BANKASI A.Ş.,VISA,CLASSIC
444677,10,T.C. ZİRAAT BANKASI A.Ş.,VISA,GOLD
444678,10,T.C. ZİRAAT BANKASI A.Ş.,VISA,PLATINUM
453955,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, CLASSIC
453956,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, GOLD
454671,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, CLASSIC
454672,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, CLASSIC
454673,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, BUSINESS
@msluyter
msluyter / gist:1925069
Created February 27, 2012 16:22
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@teamon
teamon / Auth.scala
Created April 8, 2012 13:43
Play2.0 with Github OAuth2 example
package controllers
import lib._
import play.api.mvc._
import play.api.libs.json._
object Auth extends Controller {
val GITHUB = new OAuth2[GithubUser](OAuth2Settings(
@duydo
duydo / elasticsearch_best_practices.txt
Last active December 15, 2021 06:12
Elasticsearch - Index best practices from Shay Banon
If you want, I can try and help with pointers as to how to improve the indexing speed you get. Its quite easy to really increase it by using some simple guidelines, for example:
- Use create in the index API (assuming you can).
- Relax the real time aspect from 1 second to something a bit higher (index.engine.robin.refresh_interval).
- Increase the indexing buffer size (indices.memory.index_buffer_size), it defaults to the value 10% which is 10% of the heap.
- Increase the number of dirty operations that trigger automatic flush (so the translog won't get really big, even though its FS based) by setting index.translog.flush_threshold (defaults to 5000).
- Increase the memory allocated to elasticsearch node. By default its 1g.
- Start with a lower replica count (even 0), and then once the bulk loading is done, increate it to the value you want it to be using the update_settings API. This will improve things as possibly less shards will be allocated to each machine.
- Increase the number of machines you have so
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
# Download the compiled elasticsearch rather than the source.
wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active November 29, 2023 15:35
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@snikch
snikch / test.rb
Last active January 6, 2022 13:18
Convert a UUID to UTF-8 encoding to visually shorten.
>> code = Urlcode.uuid_to_code("4c3559f0-cd95-482f-a27d-b2bbc68523ef")
=> "䰵姰축䠯ꉽ늻욅⏯"
>> Urlcode.code_to_uuid(code)
=> "4c3559f0-cd95-482f-a27d-b2bbc68523ef"
@debasishg
debasishg / gist:8172796
Last active May 10, 2024 13:37
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t
@buremba
buremba / partialindex.md
Last active August 29, 2015 14:05
hazelcast partial index

#Partial Index Implementation

A partial index is a type of index built over a subset of a map; the subset is defined by a conditional expression (called the predicate of the partial index). The index contains entries for only those table rows that satisfy the predicate. A major motivation for partial indexes is to avoid indexing common values. Since a query searching for a common value (one that accounts for more than a few percent of all the map entries) will not use the index anyway, there is no point in keeping those rows in the index at all. This reduces the size of the index, which will speed up queries that do use the index. It will also speed up many write operations (IMap.put, IMap.set etc.) because the index does not need to be updated in all cases. (benchmarks) [1]

[Wikipedia] (http://en.wikipedia.org/wiki/Partial_index)

[Postgresql] (http://www.postgresql.org/docs/8.0/static/indexes-partial.html)

[In case you may want to look at some related unit tests] (https://github.com/buremb