Skip to content

Instantly share code, notes, and snippets.

@je2ryw
je2ryw / gitlab-gc.sh
Created March 21, 2017 02:27 — forked from pbabics/gitlab-gc.sh
Manual garbage collector for gitlab registry, it removes old revisions that are not referenced by any tag
#!/bin/bash
BASE_PATH=/var/opt/gitlab/gitlab-rails/shared/registry/docker/registry/v2/repositories
DRY_RUN=0
KEEP_LAST_IMAGES=10
RUN_GARBAGE_COLLECTOR=0
GITLAB_CTL_COMMAND=`which gitlab-ctl`
@je2ryw
je2ryw / gitlab-registry-cleaner.py
Created March 21, 2017 02:31 — forked from pbabics/gitlab-registry-cleaner.py
Python script for removal of old Gitlab Registry tags (per project), usefull when you have many tags and you are too lazy to remove them manualy
#!/usr/bin/env python
import os
import json
import argparse
import math
from datetime import datetime
import dateutil.parser
import time
import sys
@je2ryw
je2ryw / gitlab-registry-stats.py
Created March 21, 2017 02:32 — forked from pbabics/gitlab-registry-stats.py
Prints statistics per project in gitlab registry (usefull for debugging purposes)
#!/usr/bin/env python2.7
import os
import json
import argparse
import math
def convert_size(size_bytes):
if (size_bytes == 0):
return '0B'
@je2ryw
je2ryw / clear.txt
Created July 7, 2018 16:15 — forked from EQuimper/clear.txt
React-Native clear Watchman + Cache
watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache
@je2ryw
je2ryw / gist:b7b21866726ae7a9c9fb0be76b2310c8
Created July 31, 2018 17:23 — forked from juanpampliega/gist:f7b68c3546d921154ac9eaabf06a8911
Install OpenX Hive JSON SerDe in Amazon EMR to use it with Presto
# Do this on every node of the cluster
curl -O http://www.congiu.net/hive-json-serde/1.3.8/hdp23/json-serde-1.3.8-jar-with-dependencies.jar
sudo cp json-serde-1.3.8-jar-with-dependencies.jar /usr/lib/presto/plugin/hive-hadoop2/
sudo chown presto:presto /usr/lib/presto/plugin/hive-hadoop2/json-serde-1.3.8-jar-with-dependencies.jar
#restart presto
sudo restart presto-server
@je2ryw
je2ryw / git-crypt-sourcetree.sh
Created September 14, 2018 15:33 — forked from bdwyertech/git-crypt-sourcetree.sh
Add git-crypt to Sourcetree's PATH
#!/bin/bash
# Add git-crypt to SourceTree's Path
# If you use Sourcetree's embedded GIT, you may have to symlink things into its PATH to make them work.
# git-crypt
ln -s /usr/local/bin/git-crypt /Applications/SourceTree.app/Contents/Resources/bin/
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
trigger_map:
- push_branch: "*"
workflow: tests
workflows:
_tests_setup:
steps:
- activate-ssh-key: {}
@je2ryw
je2ryw / ios-bitrise.yml
Created September 17, 2018 03:11 — forked from PillowUnicorn/ios-bitrise.yml
Pillow's iOS bitrise.yml
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- BITRISE_PROJECT_PATH: ios/pro_mobile.xcodeproj
opts:
is_expand: false
- BITRISE_SCHEME: pro_mobile
opts:
@je2ryw
je2ryw / android_bitrise.yml
Created September 17, 2018 03:11 — forked from PillowUnicorn/android_bitrise.yml
Pillow's Android bitrise.yml
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
trigger_map:
- push_branch: qa
workflow: qa
workflows:
_init_install:
steps:
- activate-ssh-key:
@je2ryw
je2ryw / utility.erl
Created March 3, 2019 02:49 — forked from binarytemple/utility.md
Erlang decompiler I found on the web, works for Elixir beam files too
%% Author: PCHAPIER
%% Created: 25 mai 2010
-module(utility).
%%
%% Include files
%%
%%
%% Exported Functions