Skip to content

Instantly share code, notes, and snippets.

@orotemo
orotemo / il.json
Created February 12, 2023 09:39
shopify hebrew translation file
{
"general": {
"password_page": {
"login_form_heading": "הכנס לחנות באמצעות סיסמה:",
"login_password_button": "הכנס באמצעות סיסמה",
"login_form_password_label": "סיסמה",
"login_form_password_placeholder": "סיסמתך",
"login_form_error": "סיסמה שגוייה!",
"login_form_submit": "הכנס",
"admin_link_html": "האם אתה בעל החנות? <a href=\"/admin\" class=\"link underlined-link\">התחבר כאן</a>",
CREATE DATABASE yourdbname;
CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass';
GRANT ALL PRIVILEGES ON DATABASE yourdbname TO youruser;
Plug 'slim-template/vim-slim'
Plug 'groenewege/vim-less'
Plug 'vim-erlang/vim-erlang-runtime'
Plug 'vim-erlang/vim-erlang-omnicomplete'
Plug 'vim-erlang/vim-erlang-compiler'
Plug 'vim-erlang/vim-erlang-tags'
Plug 'vim-erlang/vim-erlang-skeletons'
Plug 'elixir-lang/vim-elixir'
Plug 'guns/vim-clojure-static'
Plug 'derekwyatt/vim-scala'
set t_Co=256
colorscheme distinguished
set hlsearch
set colorcolumn=80
autocmd BufRead,BufNewFile *.skim set filetype=slim
autocmd BufRead,BufNewFile *.hamlc set filetype=haml
autocmd BufRead,BufNewFile *.json set filetype=javascript
autocmd BufRead,BufNewFile [A-Z]*file set filetype=config
autocmd BufRead,BufNewFile *.vcl set filetype=config
@orotemo
orotemo / draw_rect.sh
Last active December 21, 2016 09:22
draws rectangles with labels. example input provided. expects the input image to have similarly named `.csv` file next to it
#!/bin/bash
read base_name <<< $( echo $1 | awk -F "\." '{print $1}' )
size=$(convert "$1" -print "%wx%h\n" /dev/null)
read width height <<< $( echo $size | awk -F'[x]' '{print $1" "$2}' )
export IFS=","
prev_label=""
#!/bin/bash
read base_name <<< $( echo $1 | awk -F "\." '{print $1}' )
size=$(convert "$1" -print "%wx%h\n" /dev/null)
read width height <<< $( echo $size | awk -F'[x]' '{print $1" "$2}' )
export IFS=","
prev_label=""
#ifndef __MINUNIT_H__
#define __MINUNIT_H__
#define mu_assert(message, test) do { if (!(test)) return message; } while (0)
#define mu_run_test(test) do { char *message = test(); tests_run++; \
if (message) return message; } while (0)
extern int tests_run;
#endif //__MINUNIT_H__
@orotemo
orotemo / Dockerfile
Created January 14, 2016 08:49
based on erlang/ubuntu 14 - add root and opencv
FROM erlang-ubuntu14
RUN cd /tmp && \
wget \
https://root.cern.ch/download/root_v6.06.00.Linux-ubuntu14-x86_64-gcc4.8.tar.gz\
&& tar -zxf root_v6.06.00.Linux-ubuntu14-x86_64-gcc4.8.tar.gz -C /usr/local/share
RUN ln -sf /usr/local/share/root/include/ /usr/local/include/root && \
/bin/bash -c "source /usr/local/share/root/bin/thisroot.sh" && \
apt-get -y install python-software-properties && \
@orotemo
orotemo / Dockerfile
Created January 14, 2016 08:47
erlang esl on ubuntu 14.04
FROM ubuntu:trusty
RUN apt-get update --fix-missing && apt-get -y upgrade &&\
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5 && \
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32 && \
apt-get -y install wget && apt-get -y install git && apt-get -y install vim
RUN cd /tmp; wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && \
dpkg -i erlang-solutions_1.0_all.deb
void hex_print(byte *buf, int n) {
fprintf(stderr, "<<");
for (int i = 0; i < n; i++)
{
fprintf(stderr, "16#%02X", buf[i]);
if (i < n-1) fprintf(stderr, ",");
}
fprintf(stderr,">>\r\n");
fflush(stderr);