Skip to content

Instantly share code, notes, and snippets.

View MaximAlien's full-sized avatar

Maxim Makhun MaximAlien

  • San Francisco, CA
View GitHub Profile
@tamasgal
tamasgal / ParallelDockerJenkinsfile
Last active December 26, 2023 12:41
Looping through a list of docker images and execute their stages in parallel. More info here: https://stackoverflow.com/questions/49782267/running-multiple-docker-containers-from-a-single-jenkinsfile
def docker_images = ["python:2.7.14", "python:3.5.4", "python:3.6.2"]
def get_stages(docker_image) {
stages = {
docker.image(docker_image).inside {
stage("${docker_image}") {
echo 'Running in ${docker_image}'
}
stage("Stage A") {
switch (docker_image) {
@wojteklu
wojteklu / clean_code.md
Last active July 7, 2024 18:05
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

@gubatron
gubatron / compiling_building_c_cpp_notes.md
Last active April 18, 2024 07:58
Things to remember when compiling and linking C/C++ programs

Things to remember when compiling/linking C/C++ software

by Angel Leon. March 17, 2015;

Last update on December 14, 2023

Updated on February 27, 2023

Updated August 29, 2019.

@higepon
higepon / API.swift
Last active July 31, 2023 16:00
An example of JSON API call in Swift
//
// API.swift
//
// Created by Taro Minowa on 6/10/14.
// Copyright (c) 2014 Higepon Taro Minowa. All rights reserved.
//
import Foundation
typealias JSONDictionary = Dictionary<String, AnyObject>
@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:

@richieforeman
richieforeman / makeauthority.sh
Created July 23, 2012 21:38
Issue Your Own Self-Signed S/MIME Certs with OpenSSL
# Run this once
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@carlosmcevilly
carlosmcevilly / gist:1457794
Created December 11, 2011 02:27
xcodebuild short example
xcodebuild -project Foo.xcodeproj -target Foo -configuration Debug -sdk iphonesimulator5.0 clean build
//
// NSArray+BinarySearch.h
// BinarySearch
//
// Created by Ole Begemann on 19.04.10.
// Copyright 2010 Ole Begemann. All rights reserved.
//
#import <Foundation/Foundation.h>