Skip to content

Instantly share code, notes, and snippets.

View andersy005's full-sized avatar
:octocat:

Anderson Banihirwe andersy005

:octocat:
View GitHub Profile
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@masih
masih / fish_shell_local_install.sh
Last active June 1, 2024 22:23
Installs Fish Shell without root access
#!/bin/bash
# Script for installing Fish Shell on systems without root access.
# Fish Shell will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
FISH_SHELL_VERSION=2.1.1
@elfrank
elfrank / collaborate_on_branches.md
Last active May 7, 2024 00:29
How to work on someone else's branch

#How to work on someone else's branch

Let's assume you need to collaborate with Batman on his forked repository.

  • First, you need to add his fork as a remote.
git remote add batman git@github.com:batman/iambatman.git
  • Now, you can fetch, pull and push to his fork (if you have permissions to do so).
@parmentf
parmentf / GitCommitEmoji.md
Last active July 4, 2024 10:57
Git Commit message Emoji
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alces
alces / ansible_local_playbooks.md
Last active July 6, 2024 09:49
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
@graysonchao
graysonchao / paramiko_yubikey.py
Last active October 14, 2023 13:58
RSA+YubiKey 2FA example using Paramiko
username = raw_input("Enter SSH username:")
yubikey_string = getpass.getpass('Enter YubiKey OTP:')
client = paramiko.client.SSHClient()
# Any means of getting the PKey will do. This code assumes you've only got one key loaded in your active ssh-agent.
# See also:
# - http://docs.paramiko.org/en/1.17/api/keys.html#paramiko.pkey.PKey
# - http://docs.paramiko.org/en/1.17/api/client.html#paramiko.client.SSHClient.connect
my_pkey = paramiko.agent.Agent().get_keys()[0]
@jessfraz
jessfraz / go-release-stats.md
Last active March 9, 2019 02:32
stats on the go 1.7 release for fun

Setup:

# set CONTRIBUTORS file to mailmap to remove duplicate emails for the same name
# see: https://git-scm.com/docs/git-shortlog#_mapping_authors
$ git config mailmap.file CONTRIBUTORS

Top 10 contributors (all):

@zshaheen
zshaheen / travis_to_conda.md
Last active May 28, 2021 18:15
How to Setup Automatic Uploads to Anaconda from Travis CI in 15 minutes

How to Setup Automatic Uploads to Anaconda from Travis CI in 15 minutes

TL;DR: Edit .travis.yaml to install Anaconda and to run conda_upload.sh after testing. Edit meta.yaml to take in the environmental variables $VERSION and $CONDA_BLD_PATH. Create conda_upload.sh which sets the needed environmental variables, builds the tar archive, and uploads it to Anaconda. Finally edit some stuff on your Anaconda and Travis CI account so they can talk.

Intro

The following steps will detail how to automatically trigger Anaconda builds and uploads from Travis CI. This will only upload successful builds in the master branch and if there are multiple commits in a single day, it'll only keep the latest one. Both of these settings can easily be changed.

Edit .travis.yaml

First, edit .travis.yml so that it installs Anaconda.

install: