Skip to content

Instantly share code, notes, and snippets.

@eliranmal
eliranmal / themes.css
Created August 18, 2017 13:59
css themes
/* - - - space - - - */
.space {
background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
color: #fff !important;
}
/* put stars elements behind everything else */
.space > :not([class^=stars]) {
#!/usr/bin/env bash
if [[ $HELP = true ]]; then
less << 'EOF'
overview
--------
migrates git-flux configurations from global to local context.
@eliranmal
eliranmal / webpack-first-error.sh
Created March 21, 2017 12:04
shows how to only output the first webpack-compiler error to the console
webpack | awk '/ERROR/{f=1} f{print; if (/@/) exit}'
@eliranmal
eliranmal / pull_request.sh
Last active February 28, 2017 00:51 — forked from devongovett/pull_request.sh
Bash script to make a pull request from the current git repository.
#!/usr/bin/env bash
pull_request() {
local to_branch="$1"
if [ -z $to_branch ]; then
to_branch="master"
fi
local access_token="[some access token with lots of characters]"
@eliranmal
eliranmal / utf.sh
Created January 23, 2017 15:40
encode/decode utf strings in bash
#!/usr/bin/env sh
utf_encode() {
printf "\\\x%s" $(printf "$1" | xxd -p -c1 -u)
}
utf_decode() {
printf "%b" "$1"
}
@eliranmal
eliranmal / difftree
Last active November 20, 2016 16:28
#!/usr/bin/env bash
diff <(tree -C "$1") <(tree -C "$2")
@eliranmal
eliranmal / app.html
Last active October 27, 2016 12:15 — 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.
<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>
// 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 / npm-commons.sh
Last active June 21, 2016 11:36
functions for common npm tasks
#!/usr/bin/env bash
##################################
# functions for common npm tasks #
##################################
##### public #####
@eliranmal
eliranmal / dabblet.css
Created January 25, 2014 17:14
pseudo slider input
/* pseudo slider input */
body {
margin: 2em;
}
/* slider input */
.pseudo-slider-input {