Skip to content

Instantly share code, notes, and snippets.

Avatar

Robin Palotai robinp

  • Budapest, Hungary
View GitHub Profile
@robinp
robinp / nixos-hydra-git.txt
Last active Apr 27, 2022
Hydra with Git setup links
View nixos-hydra-git.txt
Lots of goodies like <githubstatus> pinging.
https://github.com/input-output-hk/iohk-ops/blob/bc8195de286d8b9b55b06f2046ab5412307a51b6/modules/hydra-master-common.nix
Declarative jobset bootstrapping:
https://github.com/shlevy/declarative-hydra-example
Declarative jobset with Git PR evals:
https://github.com/cleverca22/hydra-configs/tree/master/toxvpn
Other notes:
@robinp
robinp / index-kythe.sh
Last active Dec 5, 2020
Indexing Kythe Go parts
View index-kythe.sh
bazel build kythe/go/languageserver/... --experimental_action_listener kythe/go/extractors/cmd/bazel:extract_kzip_go
./bazel-bin/kythe/go/indexer/cmd/go_indexer/go_indexer $(find bazel-out/k8-fastbuild/extra_actions -name '*.go.kzip') > go.ents
./bazel-bin/kythe/go/serving/tools/write_tables/write_tables --experimental_beam_pipeline --entries go.ents --out /data/kythe/beamed
# To serve it:
# Note: public_resources set to /tmp since not needed when only API is used.
./bazel-bin/kythe/go/serving/tools/http_server/http_server --serving_table /data/kythe/beamed --listen 0.0.0.0:8080 --public_resources /tmp
View Kythe-LSIF.txt
I'm not very familiar with LSP/LSIF so far, but gave a quick read and here's a summary of LSP/LSIF vs Kythe:
- Documentation: LSP/LSIF protocol seems well documented. Kythe schema is a bit more dense, protocol needs digging around in .proto files (which are OK though).
- Generally, Kythe pipeline needs more implicit knowledge to use - some online posts might address these though.
- Windows: Kythe serving tools run on Linux, though some Docker magic might be available.
- In Kythe, the storage format and the serving protocol are more separated, while LSIF tries to maintain serialized LSP responses.
- In fact, Kythe has no standard storage format (the reference implementation uses some columnar protobufs AFAIK)
@robinp
robinp / bruteforcer.py
Created Mar 21, 2012
lost Android keystore password recovery utility
View bruteforcer.py
import subprocess as sp
import sys
# here you define general mutation rules
def upperCaseAllTs(x): return x.replace("t", "T")
def mySecretStrategy(x): return x.replace("34", "#$")
def cap(x): return x.capitalize()
# and put the mutator strategies here
strats = [upperCaseAllTs, mySecretStrategy, cap]
@robinp
robinp / github-vertical-unspace.user.css
Last active Apr 17, 2020
Stylus script for to make github code review vertically more compact.
View github-vertical-unspace.user.css
/* Remove below comment in Stylus */
// Install Stylus, a minimal permissions CSS-modifier: https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne//
// Set to use regex match https://github.com/.*/pull/.*/files
// also https://github.com/.*/commit/.*#diff-.*
body {
font-size: 12px;
}
.blob-num {
@robinp
robinp / main.lua
Created Apr 13, 2020
Source for Lua+Löve game programming tutorial, part 01
View main.lua
print("Hello")
kartyak = 8
kartyaFelforditva = {
[1] = false,
[2] = false,
[3] = false,
[4] = false,
[5] = false,
@robinp
robinp / Streaming.hs
Created Mar 31, 2019
LevelDB Stream merging and grouping
View Streaming.hs
{- Note: originally for treetide.com -}
{- Releasing under Apache 2.0 licence (https://www.apache.org/licenses/LICENSE-2.0), feel free to reuse accordingly. -}
{-# LANGUAGE TupleSections #-}
module Database.LevelDB.Streaming.Extended
( module X
, mergeStreams
, groupStream
)
where
@robinp
robinp / run.bat
Created Feb 10, 2019
Converting image dirs to pdf using imagemagick on Windows
View run.bat
for /D %%f in (*) do (
cd %%f
mkdir annotated
magick mogrify -path annotated -set filename:xxx %%t -fill black -undercolor white -gravity southwest -pointsize 24 -annotate +0+0 "%%[filename:xxx]" *png *jpg
magick convert annotated/* ../%%~nf.pdf
rm -r annotated
cd ..
)
@robinp
robinp / Bazel build error
Created Jan 17, 2019
Bazel action_env gets lost somewhere
View Bazel build error
$ sh invoke-build.sh kythe/cxx/extractor/...
...
SUBCOMMAND: # //kythe/cxx/extractor:index_pack [action 'Compiling kythe/cxx/extractor/index_pack.cc [for host]']
(cd /home/ron/.cache/bazel/_bazel_ron/084c77e61dfc73e2d0fc7fb1fb9a9252/execroot/io_kythe && \
exec env - \
PATH=/nix/store/vs6d2fjkl4kb3jb7rwibsd76k9v2n4xy-bash-4.4-p23/bin:/nix/store/lvhndwdy2q09fhwgzykjjigz7yxq5yiv-coreutils-8.30/bin:/nix/store/5c2428hk25dwsgnifcmn5dvgrwvvgvrx-findutils-4.6.0/bin:/nix/store/9jjxqhwak78zi94m7gvwdw3gqzd1hr1b-gawk-4.2.1/bin:/nix/store/f7c1ijdv5czqb0dxi4mi5wkfvi1pc7rn-gnugrep-3.3/bin:/nix/store/4lvbww6zrphadhcbqidx8qskc0rsblg6-gnused-4.7/bin:/nix/store/mwc5mwvw080nbahpdc0xr1rk3mhkcdp1-which-2.21/bin:/nix/store/c39nikyab2qfifbqzy7hqqkhvk7k05ca-unzip-6.0/bin \
PWD=/proc/self/cwd \
/nix/store/isg8rxaxkijl9x3hr2gzsf8pqfnqxg3k-gcc-wrapper-7.4.0/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/nix/store/isg8rxaxkijl9x3hr2gzsf8pqfnqxg3k-gcc-wrapper-7.4.0/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-n
@robinp
robinp / pom.xml
Created Jul 21, 2011
Sample pom.xml for Scala 2.8.1 maven project
View pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mygroup/groupId>
<artifactId>my-artifact</artifactId>
<version>1.0-SNAPSHOT</version>
<name>${project.artifactId}</name>
<description>My wonderfull scala app</description>
<inceptionYear>2010</inceptionYear>
<licenses>
<license>