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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
... | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-release-plugin</artifactId> | |
<dependencies> |
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
from django.utils.http import urlquote | |
from functools import wraps | |
from django.utils.decorators import available_attrs | |
from django.contrib.auth import REDIRECT_FIELD_NAME | |
from common.shortcuts import render_json | |
from django.http import HttpResponseRedirect | |
def user_passes_test(test_func, login_url=None, redirect_field_name=REDIRECT_FIELD_NAME): | |
""" | |
MODIFIED from django/contrib/auth/decorators.py - now returns our custom JSON-failure |
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
package org.eclipse.jgit.transport; | |
import org.eclipse.jgit.lib.NullProgressMonitor; | |
import org.eclipse.jgit.lib.RepositoryTestCase; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.ArrayList; |
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
package org.eclipse.jgit.transport; | |
import org.eclipse.jgit.junit.TestRepository; | |
import org.eclipse.jgit.lib.*; | |
import org.eclipse.jgit.revwalk.RevBlob; | |
import org.eclipse.jgit.storage.file.PackFile; | |
import org.eclipse.jgit.util.JGitTestUtil; | |
import org.eclipse.jgit.util.NB; | |
import org.eclipse.jgit.util.TemporaryBuffer; |
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
// 0ttt1000 | |
// 0iii1000 | |
def monkey(t: Int, w: Int) = (t<<12) + (8<<8) + (w << 4) + (8) | |
for (t <- 1 to 4; windowBit <- 0 to 7) { | |
val header = monkey(t,windowBit) | |
println(t, windowBit, header, "%04X" format header, header % 31 == 0) | |
} |
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
M2_HOME=/tools/maven/current | |
ANDROID_HOME=/tools/android-sdk-linux | |
IDEA_JDK=/usr/lib/jvm/jdk1.7.0_01 | |
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" |
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
def getWithRetries(retries: Int) : Promise[Either[Throwable, String]] = { | |
Http(url OK as.Response(r => r.getResponseBody)).either.map { | |
_ match { | |
case fail: Left[Throwable, String] => | |
println("Download attempt failed - remaining retries: "+retries+" : " + fail.a.getMessage) | |
if (retries > 0) { | |
Thread.sleep(5000 / retries) | |
getWithRetries(retries - 1)() // probably bad? | |
} else fail | |
case s => s |
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 verify-pack -v .git/objects/pack/*.idx | grep blob | cut -c1-40,48- | cut -d' ' -f1,3 | sort -n -r --key 2 | head -500 > top-500-biggest-blobs.txt |
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 verify-pack -v .git/objects/pack/*.idx | grep tree | cut -c1-40 | xargs -n1 -iX sh -c "git ls-tree X | cut -c8- | grep ^blob | cut -c6-" | sort | uniq |
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 sh | |
TREEDATA=$(git ls-tree -r $2 | grep ^.......blob | cut -c13-) | |
while IFS= read -r line ; do | |
echo "$TREEDATA" | grep ^$line | cut -c42- | xargs -n1 -iX sh -c "echo $line > 'X.REMOVED.sha' && rm 'X'" & | |
done < $1 | |
wait |
OlderNewer