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
View github-enterprise-fetch-raw.sh
#
# a one-liner to get raw content from github enterprise, relying on basic authentication.
# eliminates the need to create an access token and incorporate it in the url.
#
#
# fill in the blanks:
#
# USER your login user name for authentication (you'll be prompted for password on the terminal)
# GHE_DOMAIN the github enterprise custom domain
@eliranmal
eliranmal / teamcity-auto-run.js
Last active Aug 8, 2018
periodically triggers teamcity builds. just stuff it in the dev console (but don't forget it running!)
View teamcity-auto-run.js
(function (triggerIntervalSeconds) {
triggerIntervalSeconds = triggerIntervalSeconds || (60 * 5);
var runInterval = triggerIntervalSeconds * 1000;
var runBuildTimeout = 300;
function runBuild(done) {
var runBtn = jQuery("button:contains(Run)")[0];
console.log('opening build run dialog...');
@dzzh
dzzh / teamcity_github_pr_branch.py
Created Mar 7, 2017
Inject source and target branches from Github pull request into TeamCity CI
View teamcity_github_pr_branch.py
#!/usr/bin/env python
import os
import sys
import urllib2
import json
'''
This script queries Github for source and target branches of a pull request
and updates environment variables at TeamCity CI to make these variable
@eliranmal
eliranmal / json.sh
Last active Jun 11, 2019
a bash json parser via node js
View json.sh
#!/usr/bin/env bash
# example usage:
#
# json_response="$(curl --flag http://whatever.man)" # -> { "status": 22, "errors": [ { "message": "oh no!" } ] }
# errors="$(echo "$json_response" | json_get "errors")"
# [[ $errors ]] && {
# msg="$(echo "$errors" | json_get "0" | json_get "message")"
# }
json_get() {
@eliranmal
eliranmal / pull_request.sh
Last active Feb 28, 2017 — forked from devongovett/pull_request.sh
Bash script to make a pull request from the current git repository.
View pull_request.sh
#!/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]"
View flow-experience.md

Trying Flow on my node.js code…Let’s see how this goes

Finding the getting started guide:

  1. google flow
  2. click “getflow.com”
  3. was something else
  4. google flow javascript
  5. found flowtype.org
  6. Click “get started” and landed here https://flowtype.org/docs/getting-started.html#_
@xjamundx
xjamundx / blog-webpack-2.md
Last active Aug 16, 2019
From Require.js to Webpack - Part 2 (the how)
View blog-webpack-2.md

This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.

In that post I talked about 3 main reasons for moving from require.js to webpack:

  1. Common JS support
  2. NPM support
  3. a healthy loader/plugin ecosystem.

Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.

@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active Sep 12, 2019
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon
View ultimate-ut-cheat-sheet.md

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@devongovett
devongovett / pull_request.sh
Created Apr 10, 2014
Bash script to make a pull request from the current git repository. Tries the upstream remote if possible, otherwise uses origin.
View pull_request.sh
# put this in your .bash_profile
pull_request() {
to_branch=$1
if [ -z $to_branch ]; then
to_branch="master"
fi
# try the upstream branch if possible, otherwise origin will do
upstream=$(git config --get remote.upstream.url)
origin=$(git config --get remote.origin.url)
You can’t perform that action at this time.