Skip to content

Instantly share code, notes, and snippets.

🚁
Latam po mieście

Piotr Kowalski piecioshka

Block or report user

Report or block piecioshka

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
@archiewald
archiewald / pre-push.sh
Last active Mar 26, 2019
[warn pushing to protected branches] #git
View pre-push.sh
!/bin/bash
protected_branches=('master' 'develop')
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
is_branch_protected=false;
for protected_branch in "${protected_branches[@]}"
do
if [ $protected_branch = $current_branch ]
then
View gist:6440baf05587761f742d5bfc66cd9224
#!/usr/bin/env bash
cd ./tests
for i in $(ls -d */);
do
cd ${i};
echo "------------------------------------------"
echo "Testing " ${i}
echo "------------------------------------------"
@rsp
rsp / how-to-create-a-pull-request.md
Last active Nov 1, 2018
How to create a Pull Request on GitHub
View how-to-create-a-pull-request.md

How to create a Pull Request on GitHub

1. Fork the repository:

![Fork the repo][fork-repo]

2. Select user or organization to fork as:

(if you belong to one or more organizations with appropriate permissions)

View questions-for-your-interviewer.md

I bundled these up into groups and wrote some thoughts about why I ask them!

If these helped you, I'd love to hear about it!! I'm on twitter @vcarl_ or send me an email carl.vitullo@gmail.com

Onboarding and the workplace

https://blog.vcarl.com/interview-questions-onboarding-workplace/

  • How long will it take to deploy my first change? To become productive? To understand the codebase?
  • What kind of equipment will I be provided? Will the company pay/reimburse me if I want something specific?
@rsp
rsp / GitHub-Project-Guidelines.md
Last active Apr 8, 2019
Git Strict Flow and GitHub Project Guidelines - setup rules and git flow for commercial and open-source projects by @rsp
View GitHub-Project-Guidelines.md

Git Strict Flow and GitHub Project Guidelines

Or how to turn this:

into this:

@rendfall
rendfall / angular-tabs.component.ts
Created Sep 28, 2017
Angular 2+ tabsComponent
View angular-tabs.component.ts
import { AfterContentInit, Component, Input, OnChanges, SimpleChanges } from '@angular/core';
interface TabInterface{
active: boolean;
name: string
}
@Component({
selector: 'app-tab',
template: `<div class="tab" [hidden]="!active"><ng-content></ng-content></div>`,
@myshov
myshov / function_invocation.js
Last active Jan 21, 2019
11 Ways to Invoke a Function
View function_invocation.js
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);
@SitePointEditors
SitePointEditors / dom-helper.js
Created Mar 28, 2017 — forked from m3g4p0p/dom-helper.js
Mini jQuery, sort of.
View dom-helper.js
/**
* A collection of helper prototype for everyday DOM traversal, manipulation,
* and event binding. Sort of a minimalist jQuery, mainly for demonstration
* purposes. MIT @ m3g4p0p
*/
window.$ = (function (undefined) {
/**
* Duration constants
* @type {Object}
@eonil
eonil / gist:f6031d17401bd167f28391ccd0642dbe
Created Feb 16, 2017
How to replace string in files in Bash...
View gist:f6031d17401bd167f28391ccd0642dbe
find . -name *.json | xargs sed -i -e 's/\"AAA\"/\"BBB\"/g'
@ljharb
ljharb / array_iteration_thoughts.md
Last active May 5, 2019
Array iteration methods summarized
View array_iteration_thoughts.md

While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.

Intro

JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it much simpler to think about both the old list and the new one, what they contain, and

You can’t perform that action at this time.