Skip to content

Instantly share code, notes, and snippets.

@maximlt
maximlt / make_conda_available_on_windows.md
Last active June 30, 2025 20:43
Make conda easily available on Windows

Make conda easily available on Windows

The goal is to lower the burden of running a script with Python when that Python executable is encapsulated within a conda environment. There are several ways to do that.

Add Anaconda Prompt to Windows right click context menu

Adapted from jiewpeng's gist (original gist here)

This describes how to add Anaconda Prompt to the Windows right click context menu. In doing so, the user can open a Command Prompt in any folder from the File Explorer, which is going to be activated

@x3rAx
x3rAx / docker-compose-up-fix.sh
Last active December 2, 2019 12:11
Transparently change default behavior of `docker-compose up` to be detached
# DISCLAIMER
#
# I do not take any responsibility and I'm not liable for any damage caused
# through the usage of this script.
#
# I have tested every case I can think of and I'm pretty confident, that there
# are no major errors in this script but future versions of `docker-compose`
# might introduce changes that interfere with this wrapper.
#
# ==> Use at your own risk! <==
@merikan
merikan / Jenkinsfile
Last active October 20, 2025 06:37
Some Jenkinsfile examples
Some Jenkinsfile examples
@mrhockeymonkey
mrhockeymonkey / Jenkinsfile
Last active April 20, 2024 01:17
Jenkins pipeline running a remote ansible playbook
#!groovy
pipeline {
agent any
//These params will be displayed for user input when running a build, They are also accepted by the API
parameters {
string(name: 'BUILD_HOSTNAME', description: 'The name of the server to build (from Mdb)')
string(name: 'ILO_IP', description: 'The IP address for the server ilo')
booleanParam(name: 'skipOneView', description: 'Skip the OneView stage?', defaultValue: false)
@ajdruff
ajdruff / fix-git-line-endings
Last active October 13, 2025 19:09
Forces all line endings to LF in your git repo.
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF
@mingrammer
mingrammer / boto-elastic-transcoder-manager-example.py
Last active November 14, 2022 16:50
Python script for AWS Elastic Transcoder with boto api
# -*- coding: utf-8 -*-
import hashlib
import boto3
class ETSManager:
"""
@todo: manages and provides the ets services
@dgulinobw
dgulinobw / iam_scan.py
Last active November 14, 2019 14:30
List all IAM policies in account. Pipe to grep to find who has access to what.
#!/usr/bin/env python
from __future__ import print_function
import boto3
from pygments import highlight, lexers, formatters
from botocore.exceptions import ClientError
iam = boto3.resource('iam')
s3 = boto3.client('s3')
@magnetikonline
magnetikonline / README.md
Last active February 14, 2023 23:42
AWS clone VPC route table and routes.

AWS clone VPC route table and routes

Python script to clone an existing VPC route table. Script output is a series of AWS CLI calls to create the route table and assign routes.

Update AWS_TARGET_REGION and SOURCE_ROUTE_TABLE_ID to suit.

Note: does not currently support NAT Gateways routes due to Boto 2 API limitation.

Example

;/*++
;
;Copyright (c) Microsoft Corporation. All rights reserved.
;
;Module Name:
; usbser.inf
;
;Abstract:
; INF file for installing the USB Serial driver
;
@renzok
renzok / Dockerfile
Last active November 10, 2024 16:50
docker: mapping host uid and gid to user inisde container
FROM debian:jessie
ENV USER=boatswain USER_ID=1000 USER_GID=1000
# now creating user
RUN groupadd --gid "${USER_GID}" "${USER}" && \
useradd \
--uid ${USER_ID} \
--gid ${USER_GID} \
--create-home \