Skip to content

Instantly share code, notes, and snippets.

:electron:
learning

Eliran Malka eliranmal

:electron:
learning
Block or report user

Report or block eliranmal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@eliranmal
eliranmal / utf.sh
Created Jan 23, 2017
encode/decode utf strings in bash
View utf.sh
#!/usr/bin/env sh
utf_encode() {
printf "\\\x%s" $(printf "$1" | xxd -p -c1 -u)
}
utf_decode() {
printf "%b" "$1"
}
View difftree
#!/usr/bin/env bash
diff <(tree -C "$1") <(tree -C "$2")
@eliranmal
eliranmal / app.html
Last active Oct 27, 2016 — forked from geleto/app.html
Aurelia - change to a bound repeat input element is applied to the VM a second time after the element has been deleted.
View app.html
<template>
<h3>messages</h3>
<p>${messages.length}</p>
<p>${messages}</p>
<div repeat.for="i of messages.length">
<input type="text" value.bind="$parent.messages[i]" input.delegate="onMessageChanged(i)">
</div>
</template>
View grunt-sass-replace.js
// this is a configuration file for grunt-string-replace plugin
// todo - turn this into a proper grunt plugin of its own
module.exports = function (grunt) {
var config = {
sass: {}
},
@eliranmal
eliranmal / colors
Last active Nov 30, 2018 — forked from twerth/colors
List colors in shell
View colors
#!/usr/bin/env bash
echo -e "\033[0mNC (No color)"
echo -e "\033[1;37mWHITE\t\033[0;30mBLACK"
echo -e "\033[0;34mBLUE\t\033[1;34mLIGHT_BLUE"
echo -e "\033[0;32mGREEN\t\033[1;32mLIGHT_GREEN"
echo -e "\033[0;36mCYAN\t\033[1;36mLIGHT_CYAN"
echo -e "\033[0;31mRED\t\033[1;31mLIGHT_RED"
echo -e "\033[0;35mPURPLE\t\033[1;35mLIGHT_PURPLE"
echo -e "\033[0;33mYELLOW\t\033[1;33mLIGHT_YELLOW"
@eliranmal
eliranmal / npm-commons.sh
Last active Jun 21, 2016
functions for common npm tasks
View npm-commons.sh
#!/usr/bin/env bash
##################################
# functions for common npm tasks #
##################################
##### public #####
@eliranmal
eliranmal / dabblet.css
Last active Aug 29, 2015
switching kittens #6 - love thy kitten
View dabblet.css
/* switching kittens #6 - love thy kitten */
input[type=checkbox] {
display: none;
}
input[type=checkbox] + label {
background-image: url('//placekitten.com/400/404');
display: block;
width: 400px;
@eliranmal
eliranmal / dabblet.css
Last active Aug 29, 2015
switching kittens #5 - be aggressive, b-e aggressive
View dabblet.css
/* switching kittens #5 - be aggressive, b-e aggressive */
input[type=checkbox] {
appearance: none;
}
input[type=checkbox] + label {
background-image: url('//placekitten.com/407/407');
display: block;
width: 400px;
@eliranmal
eliranmal / dabblet.css
Last active Aug 29, 2015
switching kittens #4 - abuse your browser some more
View dabblet.css
/* switching kittens #4 - abuse your browser some more */
input[type=checkbox] {
background-image: url('//placekitten.com/406/408');
width: 400px;
height: 400px;
display: block;
appearance: none;
}
@eliranmal
eliranmal / dabblet.css
Last active Aug 29, 2015
switching kittens #2 - abuse your browser
View dabblet.css
/* switching kittens #2 - abuse your browser */
input[type=checkbox] {
content: url('//placekitten.com/406/404');
width: 400px;
height: 400px;
}
input[type=checkbox]:checked {
content: url('//placekitten.com/404/404');
You can’t perform that action at this time.