#!/bin/bash
# update ubuntu server
sudo apt-get update
# upgrade ubuntu server
sudo apt-get upgrade
# install curl, make, g++ and git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type ClassType<T> = new () => T; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Python script to find the largest files in a git repository. | |
# The general method is based on the script in this blog post: | |
# http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/ | |
# | |
# The above script worked for me, but was very slow on my 11GB repository. This version has a bunch | |
# of changes to speed things up to a more reasonable time. It takes less than a minute on repos with 250K objects. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is a modification of gitlab-gc.sh script created by Peter Bábics (pbabics/gitlab-gc.sh) | |
# Improvements | |
# - Searching in all BASE_PATH, not fixing the search to a depth of 2 | |
# - Directories without valid tags or revisions directories won't be processed (to avoid unexpected issues) | |
# - Logging in case there's nothing to delete | |
# - running registry-garbage-collect only when something has been deleted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:10-alpine | |
LABEL maintainer="Mohammed Essehemy <[email protected]>" | |
WORKDIR /source | |
COPY package.json . | |
# .npm-deps https://github.com/Automattic/node-canvas/issues/866 | |
RUN apk add --no-cache --virtual .build-deps git build-base g++ && \ | |
apk add --no-cache cairo-dev libjpeg-turbo-dev pango-dev && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Switch Node images to non-alpine as PhantomJS doesn't run on Alpine | |
FROM node:10-jessie-slim | |
LABEL maintainer="Mohammed Essehemy <[email protected]>" | |
ENV BUILD_PACKAGES="curl build-essential g++ flex bison gperf ruby perl \ | |
libssl-dev libpng-dev libjpeg-dev python \ | |
libx11-dev libxext-dev libsqlite3-dev \ | |
libicu-dev libfreetype6" | |
ENV RUN_PACKAGES="libfontconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:8.12-stretch as build-stage | |
LABEL maintainer="Mohammed Essehemy <[email protected]>" | |
ENV METEOR_ALLOW_SUPERUSER=true | |
WORKDIR /source | |
ADD ./ /source/ | |
RUN curl https://install.meteor.com/ | sh && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# credits: https://serverfault.com/a/426429/452807 | |
PRIVKEY=id_rsa | |
TESTKEY=id_rsa.pub | |
diff <( ssh-keygen -y -e -f "$PRIVKEY" ) <( ssh-keygen -y -e -f "$TESTKEY" ) |
NewerOlder