This file contains hidden or 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/env python | |
# | |
# Script to identify extensions in a Git repository that should go to LFS | |
# | |
import os | |
cwd = os.getcwd() | |
min_size_mb = 0.5 | |
result = {} |
This file contains hidden or 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/env bash | |
printf "protocol=https\nhost=github.com\n\n" | git credential-$(git config credential.helper) get |
This file contains hidden or 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
git-lfs ls-files | cut -c 14- | tr '\n' '\0' | xargs -0 ls -l | awk '{$1=$2=$3=$4=$6=$7=$8="";print}' | sort -n |
This file contains hidden or 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/env bash | |
# | |
# Clone Git repositories and download LFS files in parallel | |
# | |
set -e | |
CLEAN_ERROR='push @lines, $_;splice @lines, 0, 7 if /error: external filter failed/;print shift @lines if @lines > 6}{ print @lines;' | |
git -c filter.lfs.smudge= \ | |
-c filter.lfs.required=false \ |
This file contains hidden or 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
codecs=[ | |
'ascii', | |
'big5', | |
'big5hkscs ', | |
'cp037', | |
'cp424', | |
'cp437', | |
'cp500', | |
'cp720', | |
'cp737', |
This file contains hidden or 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/sh | |
# | |
# !!! Please run this test on Windows !!! | |
# | |
# Unexpected result confirmed with the following versions: | |
# $ git --version | |
# git version 1.9.5.msysgit.1 | |
# git version 2.5.0.windows.1 | |
# |
This file contains hidden or 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/env ruby | |
require 'rubygems' | |
require 'bundler/setup' | |
require 'octokit' | |
if $0 == __FILE__ | |
dotcom_token = ARGV[1] |
This file contains hidden or 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/env bash | |
GIT_REMOTE="https://path/to/your/repo.git" | |
# Download BFG from here: | |
# https://github.com/rtyley/bfg-repo-cleaner/releases/download/git-lfs-alpha/bfg-1.12.4-SNAPSHOT-git-lfs-7242876.jar | |
GIT_BFG="/path/to/downloaded/bfg-1.12.4-SNAPSHOT-git-lfs-7242876.jar" | |
rm -rf bfg-upload | |
mkdir bfg-upload | |
pushd bfg-upload > /dev/null |
This file contains hidden or 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
import boto.emr | |
from boto.s3.key import Key | |
from boto.s3.connection import S3Connection | |
aws_key = 'your-key' | |
aws_secret = 'your-secret' | |
bucket_name = 'your-bucket-name' | |
result_file_name = 'your-result-file-path' | |
s3_connection = S3Connection(aws_key, aws_secret, validate_certs=False) |
This file contains hidden or 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
#pragma once | |
// Use this macro to localize strings in "common" code (code that is used in iOS and Javascript) | |
#define AIMLocalizedString(string, description) string |