Skip to content

Instantly share code, notes, and snippets.

View fkorotkov's full-sized avatar
👨‍💻
typing...

Fedor Korotkov fkorotkov

👨‍💻
typing...
View GitHub Profile
@fkorotkov
fkorotkov / gcr_auth_example.sh
Created February 26, 2018 19:57
JSON key file to Google Container Registry's HTTP API
#!/usr/bin/env bash
GCP_PROJECT_ID=...
MY_IMAGE=...
USERNAME=_json_key
PASSWORD=$(cat keyfile.json)
TOKEN=$(echo "$USERNAME:$PASSWORD" | base64)
@fkorotkov
fkorotkov / .cirrus.yml
Created January 7, 2018 16:42
Cirrus CI config of performance testing build for https://medium.com/p/37eb1af7fcde
container:
image: gradle:4.4.1-jdk8
cpu: 4
memory: 12G
no_caching_task:
dist_script: gradle dist --no-build-cache
global_caching_task:
gradle_cache:
@fkorotkov
fkorotkov / BUCK
Last active October 29, 2017 16:27
Buck RN JS bundle generation
# workaround to make rule key to depend on node and npm versions
NODE_NPM_VERSIONS = 'cat $(location //:node_version) && cat $(location //:npm_version) && '
# prepopulated modules
# for example CI fails to clone react-native-permissions fork due to ssh permissions
export_file(
name = 'locale_node_modules',
src = 'node_modules',
out = 'node_modules',
)
@fkorotkov
fkorotkov / abandoned_projects_finder.py
Last active March 17, 2016 00:35
A python script to find abandoned projects in a Git repo
# Usage: `python abandoned_projects_finder.py *.gradle`
import os
import re
import sys
import subprocess
rootdir = os.getcwd()
project_file_pattern = re.compile(sys.argv[1])
[tw-mbp-fkorotkov pants (guava-version)]$ cat /Users/fkorotkov/workspace/fkorotkov/pants/examples/src/java/org/pantsbuild/example/hello/greet/BUILD
jar_library(name='guava',
jars=[
jar('com.google.guava', 'guava', '16.0',
apidocs='http://docs.guava-libraries.googlecode.com/git-history/v16.0/javadoc/'),
])
java_library(name = 'greet',
dependencies = [':guava'],