Skip to content

Instantly share code, notes, and snippets.

View bruce-szalwinski's full-sized avatar

Bruce Szalwinski bruce-szalwinski

View GitHub Profile
@wojtek-oledzki
wojtek-oledzki / Makefile-ansible-aws
Last active August 7, 2018 23:15
Makefile target for "assume role" access with ansible
SOURCE_PROFILE ?= default
PROFILE ?= my-profile-with-role
ASSUME_ROLE ?= arn:aws:iam::123498765678:role/my_admin_role
## Assumes role and udpates ~/.aws/credentials
# Example: make assume_role
assume_role:
@aws sts assume-role \
--profile $(SOURCE_PROFILE) \
--output text \
@stevear22
stevear22 / AWS-boto3_tag_volumes_to_match_instance.py
Created February 11, 2016 23:29
AWS (Boto3) find EC2 instances and change tags on attached EBS volumes to match
import boto3
region_list = ['us-west-1', 'us-west-2']
for region in region_list:
print 'REGION:', region
ec2 = boto3.resource('ec2', region)
for instance in ec2.instances.all():
print ' instance:', instance
ec2tags = instance.tags
@rsperl
rsperl / generate_iterm2_dynamic_profiles.pl
Last active July 25, 2022 13:08
Reads in ~/.ssh/config and generates iterm2 dynamic profiles #perl #iterm2 #macos #ssh #snippet
#!/usr/bin/env perl
#
# licensed under GPL v2, same as iTerm2 https://www.iterm2.com/license.txt
#
use strict;
use JSON;
my $output = $ENV{HOME} . "/Library/Application\ Support/iTerm2/DynamicProfiles/profiles.json";
@max-mapper
max-mapper / 0.md
Last active February 25, 2024 12:24
JS hoisting by example

JavaScript function hoisting by example

Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.

To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js

Notes on hoisting

(I may be using incorrect terms below, please forgive me)

@sergeyhush
sergeyhush / jenkins-create-node.sh
Last active September 19, 2022 11:38
Jenkins create new node
#!/bin/bash
JENKINS_URL=$1
NODE_NAME=$2
NODE_SLAVE_HOME='/home/build/slave'
EXECUTORS=1
SSH_PORT=22
CRED_ID=$3
LABELS=build
USERID=${USER}
@Chaser324
Chaser324 / GitHub-Forking.md
Last active July 17, 2024 07:49
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@rxaviers
rxaviers / gist:7360908
Last active July 17, 2024 08:59
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@tony4d
tony4d / p4merge4git.md
Created August 24, 2012 19:00
Setup p4merge as a visual diff and merge tool for git