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
  • 20:22 (UTC)
  • X @bu7emba
View GitHub Profile
@troyharvey
troyharvey / README.md
Last active May 12, 2024 08:25
GitHub Action for running the getdbt.com dbt CLI with BigQuery

Using GitHub Actions to run dbt

This example shows you how to use GitHub Actions to run dbt against BigQuery.

  1. Follow the instructions on getdbt.com for installing and initializing a dbt project.

  2. Copy this action (dbt.yml) into the workflows directory.

     mkdir .github
     mkdir .github/workflows
    

cp ~/Downloads/dbt.yml .github/workflows/

@mksglu
mksglu / hepsiburada.js
Last active October 31, 2022 14:36
hepsiburada.com üzerinden yaptığınız toplam alışveriş tutarını gösterir. https://www.hepsiburada.com adresine girdikten sonra uye girisi yapin ve tarayicinin konsoluna asagidaki kodu yapistirip entere basmaniz yeterli.
fetch("https://www.hepsiburada.com/siparislerim/api/orders?skip=0").then(function(r){return r.json()}).then(function(r){var e=r.MaxSkip;if(0===e){for(var n=0,a=0;a<r.Orders.length;a++)n+=parseInt(r.Orders[a].TotalAmount.Value);console.log("Toplam Hepsiburada.com harcamaniz: ",n.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,"),"TL")}else{(function(r,e){for(var n=[],a=0;a<r+e;a+=e)n.push(fetch("https://www.hepsiburada.com/siparislerim/api/orders?skip=".concat(a)).then(function(r){return r.json()}).then(function(r){for(var e=0,n=0;n<r.Orders.length;n++)e+=parseInt(r.Orders[n].TotalAmount.Value);return e}));return Promise.all(n)})(e,10).then(function(r){var e=r.reduce(function(r,e){return r+e},0).toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,");console.log("Toplam Hepsiburada.com harcamaniz: ",e,"TL")})}});
@jonsamp
jonsamp / localhost-ssl.sh
Created June 11, 2017 21:16
Create https key and cert on localhost
cd ~/
mkdir .localhost-ssl
sudo openssl genrsa -out ~/.localhost-ssl/localhost.key 2048
sudo openssl req -new -x509 -key ~/.localhost-ssl/localhost.key -out ~/.localhost-ssl/localhost.crt -days 3650 -subj /CN=localhost
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/.localhost-ssl/localhost.crt
npm install -g http-server
echo "
function https-server() {
@cheeseplus
cheeseplus / default.rb
Last active September 6, 2016 18:12
repro for template
node.default['ip'] = '173.194.207.113'
template '/tmp/template_hack' do
source 'template.erb'
owner 'root'
group 'root'
mode 00744
end
@splosch
splosch / md5_device_fingerprint.js
Last active March 6, 2018 20:50
Browser and device fingerprinting - a MD5 checksum generator to identify a device-browser-combination
(function(window, document, JSON){
"use strict";
var SEP = '|', ua, opera, ie;
/*
* Collect Browser & Device Data
*/
var Collector = {
/*
* MD5 Checksum calculation
*/
@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

@debasishg
debasishg / gist:8172796
Last active October 3, 2024 12:09
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
@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"
@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>
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