Skip to content

Instantly share code, notes, and snippets.

@loivis
loivis / all_aws_lambda_modules.txt
Created June 12, 2016 22:25 — forked from gene1wood/all_aws_lambda_modules_python.md
AWS Lambda function to list all available Python modules and post the list to Pastebin
# module list (generated by listmodules.py)
#
# timestamp='20160226T200954Z'
# sys.version='2.7.10 (default, Dec 8 2015, 18:25:23) \n[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]'
# sys.platform='linux2'
# platform='Linux-4.1.13-19.31.amzn1.x86_64-x86_64-with-glibc2.2.5'
#
BaseHTTPServer
Bastion
CDROM
@loivis
loivis / .a curated list of AWS resources to prepare for the AWS Certifications
Last active August 18, 2018 13:37 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of AWS resources to prepare for the AWS Certifications
#!/bin/bash
# latest ubuntu 16.04 ami
aws ec2 describe-images --owners "099720109477" --filters Name="root-device-type",Values="ebs" \
Name=architecture,Values=x86_64 Name=name,Values='ubuntu/images/hvm-ssd/ubuntu-xenial-16.04*' \
--query 'sort_by(Images, &CreationDate)[-3:].[ImageId, CreationDate, Name]' --output=text
aws ec2 describe-images --owners "099720109477" --filters Name="root-device-type",Values="ebs" \
Name=architecture,Values=x86_64 Name=name,Values='ubuntu/images/hvm-ssd/ubuntu-xenial-16.04*' \
--query 'sort_by(Images, &CreationDate)[-1].ImageId' --output=text
  • .gitignore_global
  • .vimrc
// delete build history in range and reset build number
fullJobName = "full/job/name"
start = 1
end = 10
nextBuildNumber = 1
item = Jenkins.instance.getItemByFullName(fullJobName)
item.builds.each() { build ->
if (build.number >= start && build.number <= end) {
@loivis
loivis / github-markdown-emoji.md
Last active February 16, 2018 14:16 — forked from rxaviers/gist:7360908
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:
@loivis
loivis / git_rebase.md
Last active February 18, 2018 17:48 — forked from ravibhure/git_rebase.md
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@loivis
loivis / cherry-pick.md
Last active March 7, 2018 12:11 — forked from unbracketed/branch-fu.md
move commits between branches by cherry-pick

Example: Moving up to a few commits to another branch

Branch A has commits (X,Y) that also need to be in Branch B. The cherry-pick operations should be done in the same chronological order that the commits appear in Branch A.

cherry-pick does support a range of commits, but if you have merge commits in that range, it gets really complicated

git checkout branch-B
git cherry-pick X
git cherry-pick Y
@loivis
loivis / .reset commit user(author) in git history
Last active June 9, 2022 19:21
reset commit user/author in git history
reset commit user(author) in git history