Skip to content

Instantly share code, notes, and snippets.

View z5ottu's full-sized avatar
👾
hopeful

Szloboda Zsolt z5ottu

👾
hopeful
View GitHub Profile
// Arduino YM2149 MIDI Synth
// by yukimizake
// video: https://youtu.be/hUPs2pv5d_g
// schematics: http://electronicfields.wordpress.com/?attachment_id=128 (Vcc/GND not shown)
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
@z5ottu
z5ottu / riak_kv_vnode.erl
Created May 15, 2018 19:05 — forked from bowrocker/riak_kv_vnode.erl
riak_kv_vnode.erl changes to compile with YZ merge problem
%% -------------------------------------------------------------------
%%
%% riak_kv_vnode: VNode Implementation
%%
%% Copyright (c) 2007-2010 Basho Technologies, Inc. All Rights Reserved.
%%
%% This file is provided to you under the Apache License,
%% Version 2.0 (the "License"); you may not use this file
%% except in compliance with the License. You may obtain
%% a copy of the License at
#!/bin/bash
# ERL_BIN, RIAK_LIB, and BUCKET_LIB can be defaulted here or set
# in the environment
#
# Path to the erl binary provided by Riak
ERL_BIN=${ERL_BIN:-"/usr/lib64/riak/erts-5.8.4/bin/erl"}
# Path to riak libraries
RIAK_LIB=${ERL_BIN:-"/usr/lib64/riak/lib"}
handle_call({lookup_popular_replies, TweetId, AuthorId}, _From, #state{client=Client} = State) ->
% reduce fun to get valid tweet keys in tweet response bucket phase 3
Fun = make_local_fun("fun(O, _) ->
lists:foldl(fun
([LinkedTweet = <<Id:128>>, <<Val:128>>, <<\"reply\">>], Acc) ->
[{{<<\"tweet_responses_bucket\">>, LinkedTweet}, {Id, Val}} | Acc];
({{<<\"tweet_responses_bucket\">>, _}, _} = PreviousPass, Acc) ->
[PreviousPass | Acc];
(_, Acc) ->
Acc
#!/usr/bin/env escript
%% -*- erlang -*-
-include_lib("kernel/include/file.hrl").
-compile(export_all).
-define(LOG(S), io:format(S)).
-define(LOG(S,A), io:format(S,A)).
main(Dirs) ->
CodePath = case os:getenv("RIAK_LIB") of
%% -------------------------------------------------------------------
%%
%% riak_csv_etl: etl tools for csv files in Riak
%%
%% Copyright (c) 2011 Bradley Taylor. All Rights Reserved.
%%
%% This file is provided to you under the Apache License,
%% Version 2.0 (the "License"); you may not use this file
%% except in compliance with the License. You may obtain
%% a copy of the License at
% Update Counter
increment
decrement
{increment, 4}
{decrement, 9}
% Update Set
{add, <<"Value">>}
{add_all, [<<"Value">>]}
{remove, <<"Value">>}
{remove_all, <<"Value">>}
@z5ottu
z5ottu / ESP32_HID.ino
Created May 17, 2019 15:02 — forked from sabas1080/ESP32_HID.ino
Example of HID Keyboard BLE with ESP32
include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
#include "BLE2902.h"
#include "BLEHIDDevice.h"
#include "HIDTypes.h"
#include "HIDKeyboardTypes.h"
#include <driver/adc.h>
BLEHIDDevice* hid;
@z5ottu
z5ottu / erlang-elixir-on-amazon-linux.md
Last active May 25, 2020 11:34 — forked from techgaun/erlang-elixir-on-amazon-linux.md
Running elixir 1.8.1 on amazon linux

Script

set your locale:

add these lines to /etc/environment

LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@z5ottu
z5ottu / ListMemcached.md
Created May 20, 2024 14:03 — forked from abullrd/ListMemcached.md
List Memcached Keys