Skip to content

Instantly share code, notes, and snippets.

@adilsoncarvalho
adilsoncarvalho / bitbucket-pipelines.yml
Last active April 16, 2024 12:03
Bitbucket Pipelines deployment to a Google Container Engine configuration
options:
docker: true
pipelines:
branches:
master:
- step:
image: google/cloud-sdk:latest
name: Deploy to production
deployment: production
caches:
@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active July 21, 2024 20:48
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@MFry
MFry / .bash_profile
Created January 11, 2017 01:49
Fixing global npm installed modules for git bash
# This file is optional and included for completion sake
# if you generate the appropriate .bashrc file and load git-bash this file will be automatically created.
# generated by Git for Windows
test -f ~/.profile && . ~/.profile
test -f ~/.bashrc && . ~/.bashrc
@wojteklu
wojteklu / clean_code.md
Last active July 27, 2024 06:43
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@addyosmani
addyosmani / README.md
Last active July 24, 2024 10:54 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@profh
profh / decode_session_cookie.rb
Last active June 23, 2021 13:25
A simple script to decode Rails 4 session cookies
@staltz
staltz / introrx.md
Last active July 27, 2024 04:59
The introduction to Reactive Programming you've been missing
@veeneck
veeneck / curve.m
Created April 5, 2014 18:14
Follow curve to point with Sprite Kit
// Imagine shooting an arrow to a point
CGMutablePathRef path = CGPathCreateMutable();
// This will move an invisible path marker to a starting point
// In my case, the node is a child node of a sprite, so it is the local coords and not the screen coords
CGPathMoveToPoint(path, NULL, 10, 0);
// The 3-8th parameters are x/y coords. The arrow iwll first hit x:100 and y:50.
// It will then raise up a bit as it keeps going and finally drop to the target at x:300 y:0
CGPathAddCurveToPoint(path, NULL,
@demisx
demisx / angularjs-providers-explained.md
Last active May 17, 2024 03:38
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant